[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAPgLHd-L6gbKfv+5O0iJ+6vkS_o6QguxWj+7yPp-h9ZQDhb+1A@mail.gmail.com>
Date: Fri, 17 May 2013 16:25:17 +0800
From: Wei Yongjun <weiyj.lk@...il.com>
To: minyard@....org, grant.likely@...aro.org, rob.herring@...xeda.com
Cc: yongjun_wei@...ndmicro.com.cn,
openipmi-developer@...ts.sourceforge.net,
devicetree-discuss@...ts.ozlabs.org, linux-kernel@...r.kernel.org
Subject: [PATCH] ipmi: add missing platform_device_put() on error in try_smi_init()
From: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>
Add the missing platform_device_put() before return from
try_smi_init() in the platform_device_add() fail case.
Signed-off-by: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>
---
drivers/char/ipmi/ipmi_si_intf.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
index af4b23f..3f6c390 100644
--- a/drivers/char/ipmi/ipmi_si_intf.c
+++ b/drivers/char/ipmi/ipmi_si_intf.c
@@ -3299,6 +3299,7 @@ static int try_smi_init(struct smi_info *new_smi)
"Unable to register system interface device:"
" %d\n",
rv);
+ platform_device_put(new_smi->pdev);
goto out_err;
}
new_smi->dev_registered = 1;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists