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  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]
Date:	Fri, 20 Apr 2007 08:52:32 +0200
From:	Borislav Petkov <>
Subject: [PATCH] Olympic (IBM PCI tokenring): handle return codes of register_netdev

Handle return codes of register_netdev().

Signed-off-by: Borislav Petkov <>

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)
-	free_netdev(dev);
+	if (dev)
+		free_netdev(dev);
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to
More majordomo info at

Powered by blists - more mailing lists