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>] [day] [month] [year] [list]
Message-ID: <20070420065232.GA5165@zmei.tnic>
Date:	Fri, 20 Apr 2007 08:52:32 +0200
From:	Borislav Petkov <bbpetkov@...oo.de>
To:	linux-tr@...uxtr.net, netdev@...r.kernel.org
Cc:	kernel-janitors@...ts.osdl.org
Subject: [PATCH] Olympic (IBM PCI tokenring): handle return codes of register_netdev

Handle return codes of register_netdev().

Signed-off-by: Borislav Petkov <bbpetkov@...oo.de>


Index: 21-rc7/drivers/net/tokenring/olympic.c
===================================================================
--- 21-rc7.orig/drivers/net/tokenring/olympic.c
+++ 21-rc7/drivers/net/tokenring/olympic.c
@@ -264,7 +264,10 @@ static int __devinit olympic_probe(struc
 	SET_NETDEV_DEV(dev, &pdev->dev);
 
 	pci_set_drvdata(pdev,dev) ; 
-	register_netdev(dev) ; 
+
+	if (register_netdev(dev))
+		goto op_free_iomap;
+
 	printk("Olympic: %s registered as: %s\n",olympic_priv->olympic_card_name,dev->name);
 	if (olympic_priv->olympic_network_monitor) { /* Must go after register_netdev as we need the device name */ 
 		char proc_name[20] ; 
@@ -281,7 +284,8 @@ op_free_iomap:
 	if (olympic_priv->olympic_lap)
 		iounmap(olympic_priv->olympic_lap);
 
-	free_netdev(dev);
+	if (dev)
+		free_netdev(dev);
 op_release_dev:
 	pci_release_regions(pdev); 
 
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ