lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1515032129-7899-2-git-send-email-fugang.duan@nxp.com>
Date:   Thu, 4 Jan 2018 10:15:28 +0800
From:   Fugang Duan <fugang.duan@....com>
To:     <festevam@...il.com>, <davem@...emloft.net>
CC:     <netdev@...r.kernel.org>, <troy.kisky@...ndarydevices.com>,
        <andrew@...n.ch>, <fugang.duan@....com>
Subject: [PATCH v3 net,stable 1/2] net: fec: restore dev_id in the cases of probe error

The static variable dev_id always plus one before netdev registerred.
It should restore the dev_id value in the cases of probe error.

Signed-off-by: Fugang Duan <fugang.duan@....com>
---
 drivers/net/ethernet/freescale/fec_main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index e17d10b..732a8e3 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -3574,6 +3574,7 @@ static int fec_enet_get_irq_cnt(struct platform_device *pdev)
 		of_phy_deregister_fixed_link(np);
 failed_phy:
 	of_node_put(phy_node);
+	dev_id--;
 failed_ioremap:
 	free_netdev(ndev);
 
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ