ipmi: Unregister previously registered driver in error case
authortrenn@suse.de <trenn@suse.de>
Tue, 14 Oct 2014 14:40:23 +0000 (16:40 +0200)
committerCorey Minyard <cminyard@mvista.com>
Thu, 11 Dec 2014 21:04:06 +0000 (15:04 -0600)
Signed-off-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
drivers/char/ipmi/ipmi_msghandler.c

index 5b08b92c6441fb481e7210ea846d432f29511424..3e8663b1a62b7a36b138baf631febccc47621b5b 100644 (file)
@@ -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;
        }