Re: [patch 3/3] ipmi: Unregister previously registered driver in error case

From: Corey Minyard
Date: Tue Oct 14 2014 - 21:27:40 EST


Queued, thanks for spotting this.

-corey

On 10/14/2014 09:40 AM, trenn@xxxxxxx wrote:

Signed-off-by: Thomas Renninger <trenn@xxxxxxx>
CC: minyard@xxxxxxx

Index: kernel_ipmi/drivers/char/ipmi/ipmi_msghandler.c
===================================================================
--- kernel_ipmi.orig/drivers/char/ipmi/ipmi_msghandler.c
+++ kernel_ipmi/drivers/char/ipmi/ipmi_msghandler.c
@@ -4545,6 +4545,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;
}




--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/