aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/ibmasm/module.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/misc/ibmasm/module.c')
-rw-r--r--drivers/misc/ibmasm/module.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/misc/ibmasm/module.c b/drivers/misc/ibmasm/module.c
index 1ccedb71e728..168d8008f460 100644
--- a/drivers/misc/ibmasm/module.c
+++ b/drivers/misc/ibmasm/module.c
@@ -211,18 +211,17 @@ static void __exit ibmasm_exit (void)
211 211
212static int __init ibmasm_init(void) 212static int __init ibmasm_init(void)
213{ 213{
214 int result; 214 int result = pci_register_driver(&ibmasm_driver);
215 if (result)
216 return result;
215 217
216 result = ibmasmfs_register(); 218 result = ibmasmfs_register();
217 if (result) { 219 if (result) {
220 pci_unregister_driver(&ibmasm_driver);
218 err("Failed to register ibmasmfs file system"); 221 err("Failed to register ibmasmfs file system");
219 return result; 222 return result;
220 } 223 }
221 result = pci_register_driver(&ibmasm_driver); 224
222 if (result) {
223 ibmasmfs_unregister();
224 return result;
225 }
226 ibmasm_register_panic_notifier(); 225 ibmasm_register_panic_notifier();
227 info(DRIVER_DESC " version " DRIVER_VERSION " loaded"); 226 info(DRIVER_DESC " version " DRIVER_VERSION " loaded");
228 return 0; 227 return 0;