From 55ebcc38a5f6d40e4c41447e413ef842b803980f Mon Sep 17 00:00:00 2001 From: Arnaud Patard Date: Sat, 16 Sep 2006 12:15:36 -0700 Subject: [PATCH] [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 Acked-by: Corey Minyard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/char/ipmi/ipmi_si_intf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index f57eba0bf253..31b59403b632 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c @@ -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 { -- 2.20.1