summaryrefslogtreecommitdiff
path: root/drivers/char/ipmi
diff options
context:
space:
mode:
authortrenn@suse.de <trenn@suse.de>2014-10-14 16:40:23 +0200
committerCorey Minyard <cminyard@mvista.com>2014-12-11 15:04:06 -0600
commit80fad5b959398f347e3b67d8ffdc5a81af1eff82 (patch)
tree73c8df9fdc1e8e91be5ace56cab3000d871fa72d /drivers/char/ipmi
parenta11213fc36d29d42ab00d400796e98fc770c93b9 (diff)
ipmi: Unregister previously registered driver in error case
Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Corey Minyard <cminyard@mvista.com>
Diffstat (limited to 'drivers/char/ipmi')
-rw-r--r--drivers/char/ipmi/ipmi_msghandler.c1
1 files changed, 1 insertions, 0 deletions
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;
}