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-next>] [day] [month] [year] [list]
Message-Id: <20220218081130.45670-1-hbh25y@gmail.com>
Date:   Fri, 18 Feb 2022 16:11:30 +0800
From:   Hangyu Hua <hbh25y@...il.com>
To:     manishc@...vell.com, GR-Linux-NIC-Dev@...vell.com,
        coiby.xu@...il.com, gregkh@...uxfoundation.org
Cc:     netdev@...r.kernel.org, linux-staging@...ts.linux.dev,
        linux-kernel@...r.kernel.org, Hangyu Hua <hbh25y@...il.com>
Subject: [PATCH] staging: qlge: add unregister_netdev in qlge_probe

unregister_netdev need to be called when register_netdev succeeds
qlge_health_create_reporters fails.

Signed-off-by: Hangyu Hua <hbh25y@...il.com>
---
 drivers/staging/qlge/qlge_main.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/qlge/qlge_main.c b/drivers/staging/qlge/qlge_main.c
index 9873bb2a9ee4..0a199c6d77a1 100644
--- a/drivers/staging/qlge/qlge_main.c
+++ b/drivers/staging/qlge/qlge_main.c
@@ -4611,8 +4611,10 @@ static int qlge_probe(struct pci_dev *pdev,
 	}
 
 	err = qlge_health_create_reporters(qdev);
-	if (err)
+	if (err) {
+		unregister_netdev(ndev);
 		goto netdev_free;
+	}
 
 	/* Start up the timer to trigger EEH if
 	 * the bus goes dead
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ