ipmi: Unregister previously registered driver in error case

Signed-off-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
This commit is contained in:
trenn@suse.de 2014-10-14 16:40:23 +02:00 committed by Corey Minyard
parent a11213fc36
commit 80fad5b959

View File

@ -4435,6 +4435,7 @@ static int ipmi_init_msghandler(void)
proc_ipmi_root = proc_mkdir("ipmi", NULL); proc_ipmi_root = proc_mkdir("ipmi", NULL);
if (!proc_ipmi_root) { if (!proc_ipmi_root) {
printk(KERN_ERR PFX "Unable to create IPMI proc dir"); printk(KERN_ERR PFX "Unable to create IPMI proc dir");
driver_unregister(&ipmidriver.driver);
return -ENOMEM; return -ENOMEM;
} }