Fix cciss init error handling
diff mbox series

Message ID 20030302090334.GA987@gondor.apana.org.au
State New, archived
Headers show
Series
  • Fix cciss init error handling
Related show

Commit Message

Herbert Xu March 2, 2003, 9:03 a.m. UTC
The following patches against 2.4 and 2.5 makes cciss unregister properly
if initialisation fails.

Patch
diff mbox series

Index: drivers/block/cciss.c
===================================================================
RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.4/drivers/block/cciss.c,v
retrieving revision 1.1.1.14
diff -u -r1.1.1.14 cciss.c
--- drivers/block/cciss.c	28 Nov 2002 23:53:12 -0000	1.1.1.14
+++ drivers/block/cciss.c	2 Mar 2003 08:53:02 -0000
@@ -2164,12 +2164,8 @@ 
 
 	printk(KERN_INFO DRIVER_NAME "\n");
 	/* Register for out PCI devices */
-	if (pci_register_driver(&cciss_pci_driver) > 0 )
-		return 0;
-	else 
-		return -ENODEV;
-
- }
+	return pci_module_init(&cciss_pci_driver);
+}
 
 EXPORT_NO_SYMBOLS;
 static int __init init_cciss_module(void)