[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: Arnaud Patard <apatard@mandriva.com>
Acked-by: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Arnaud Patard 2006-09-16 12:15:36 -07:00 коммит произвёл Linus Torvalds
Родитель e1ed7ac77b
Коммит 55ebcc38a5
1 изменённых файлов: 1 добавлений и 0 удалений

Просмотреть файл

@ -2481,6 +2481,7 @@ static __devinit int init_ipmi_si(void)
#ifdef CONFIG_PCI
pci_unregister_driver(&ipmi_pci_driver);
#endif
driver_unregister(&ipmi_driver);
printk("ipmi_si: Unable to find any System Interface(s)\n");
return -ENODEV;
} else {