lkml.org 
[lkml]   [2013]   [May]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[PATCH] ipmi: add missing platform_device_put() on error in try_smi_init()
From
From: Wei Yongjun <yongjun_wei@trendmicro.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@trendmicro.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;


\
 
 \ /
  Last update: 2013-05-17 11:01    [W:0.020 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site