Commit 55ebcc38 authored by Arnaud Patard's avatar Arnaud Patard Committed by Linus Torvalds

[PATCH] IPMI: Fix oops on ipmi_msghandler removal for non ipmi systems

When the ipmi_si module is loaded on a system without any ipmi device, it
fails with nodev.  It would be fine if all resources were freed.  A call to
device_unregister() is missing, resulting to a oops when you remove the
ipmi_msghandler.
Signed-off-by: default avatarArnaud Patard <apatard@mandriva.com>
Acked-by: default avatarCorey Minyard <minyard@acm.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent e1ed7ac7
...@@ -2481,6 +2481,7 @@ static __devinit int init_ipmi_si(void) ...@@ -2481,6 +2481,7 @@ static __devinit int init_ipmi_si(void)
#ifdef CONFIG_PCI #ifdef CONFIG_PCI
pci_unregister_driver(&ipmi_pci_driver); pci_unregister_driver(&ipmi_pci_driver);
#endif #endif
driver_unregister(&ipmi_driver);
printk("ipmi_si: Unable to find any System Interface(s)\n"); printk("ipmi_si: Unable to find any System Interface(s)\n");
return -ENODEV; return -ENODEV;
} else { } else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment