patch-2.4.0-test12 linux/drivers/net/sundance.c

Next file: linux/drivers/net/sunhme.c
Previous file: linux/drivers/net/smc9194.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test11/linux/drivers/net/sundance.c linux/drivers/net/sundance.c
@@ -390,6 +390,7 @@
 	dev = init_etherdev(NULL, sizeof(*np));
 	if (!dev)
 		return -ENOMEM;
+	SET_MODULE_OWNER(dev);
 
 #ifdef USE_IO_OPS
 	ioaddr = pci_resource_start(pdev, 0);
@@ -609,12 +610,9 @@
 
 	/* Do we need to reset the chip??? */
 
-	MOD_INC_USE_COUNT;
-
-	if (request_irq(dev->irq, &intr_handler, SA_SHIRQ, dev->name, dev)) {
-		MOD_DEC_USE_COUNT;
-		return -EAGAIN;
-	}
+	i = request_irq(dev->irq, &intr_handler, SA_SHIRQ, dev->name, dev);
+	if (i)
+		return i;
 
 	if (debug > 1)
 		printk(KERN_DEBUG "%s: netdev_open() irq %d.\n",
@@ -1223,8 +1221,6 @@
 			dev_kfree_skb(np->tx_skbuff[i]);
 		np->tx_skbuff[i] = 0;
 	}
-
-	MOD_DEC_USE_COUNT;
 
 	return 0;
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)