summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortrenn@suse.de <trenn@suse.de>2014-10-14 18:40:23 +0400
committerCorey Minyard <cminyard@mvista.com>2014-12-12 00:04:06 +0300
commit80fad5b959398f347e3b67d8ffdc5a81af1eff82 (patch)
tree73c8df9fdc1e8e91be5ace56cab3000d871fa72d
parenta11213fc36d29d42ab00d400796e98fc770c93b9 (diff)
downloadlinux-80fad5b959398f347e3b67d8ffdc5a81af1eff82.tar.xz
ipmi: Unregister previously registered driver in error case
Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Corey Minyard <cminyard@mvista.com>
-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;
}