lkml.org 
[lkml]   [2003]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patches in this message
/
Date
Subject[PATCH] Fix cciss init error handling
From
The following patches against 2.4 and 2.5 makes cciss unregister properly
if initialisation fails.
--
Debian GNU/Linux 3.0 is out! ( http://www.debian.org/ )
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
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)Index: drivers/block/cciss.c
===================================================================
RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.5/drivers/block/cciss.c,v
retrieving revision 1.1.1.3
retrieving revision 1.2
diff -u -r1.1.1.3 -r1.2
--- drivers/block/cciss.c 24 Feb 2003 19:05:47 -0000 1.1.1.3
+++ drivers/block/cciss.c 2 Mar 2003 08:55:40 -0000 1.2
@@ -2435,11 +2435,7 @@
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);
}

static int __init init_cciss_module(void)
\
 
 \ /
  Last update: 2005-03-22 13:33    [W:0.025 / U:23.428 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site