From: trenn@suse.de Date: Tue, 14 Oct 2014 14:40:23 +0000 (+0200) Subject: ipmi: Unregister previously registered driver in error case X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=80fad5b959398f347e3b67d8ffdc5a81af1eff82;p=linux-beck.git ipmi: Unregister previously registered driver in error case Signed-off-by: Thomas Renninger Signed-off-by: Corey Minyard --- diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c index 5b08b92c6441..3e8663b1a62b 100644 --- a/drivers/char/ipmi/ipmi_msghandler.c +++ b/drivers/char/ipmi/ipmi_msghandler.c @@ -4435,6 +4435,7 @@ static int ipmi_init_msghandler(void) proc_ipmi_root = proc_mkdir("ipmi", NULL); if (!proc_ipmi_root) { printk(KERN_ERR PFX "Unable to create IPMI proc dir"); + driver_unregister(&ipmidriver.driver); return -ENOMEM; }