mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 09:19:51 +00:00
ibmasmfs: make register_filesystem the last failure exit
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
640045a1cd
commit
ea23b45310
1 changed files with 5 additions and 6 deletions
|
@ -211,18 +211,17 @@ static void __exit ibmasm_exit (void)
|
|||
|
||||
static int __init ibmasm_init(void)
|
||||
{
|
||||
int result;
|
||||
int result = pci_register_driver(&ibmasm_driver);
|
||||
if (result)
|
||||
return result;
|
||||
|
||||
result = ibmasmfs_register();
|
||||
if (result) {
|
||||
pci_unregister_driver(&ibmasm_driver);
|
||||
err("Failed to register ibmasmfs file system");
|
||||
return result;
|
||||
}
|
||||
result = pci_register_driver(&ibmasm_driver);
|
||||
if (result) {
|
||||
ibmasmfs_unregister();
|
||||
return result;
|
||||
}
|
||||
|
||||
ibmasm_register_panic_notifier();
|
||||
info(DRIVER_DESC " version " DRIVER_VERSION " loaded");
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue