lkml.org 
[lkml]   [2013]   [May]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] drivers: mfd: sec-core: Remove explicit call to mfd_remove_devices
Date
In case mfd_add_devices will fail, it will call to mfd_remove_devices
by itself and return non-zero value.

Signed-off-by: Leon Romanovsky <leon@leon.nu>
---
drivers/mfd/sec-core.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c
index 5b740a3..c93ed3d 100644
--- a/drivers/mfd/sec-core.c
+++ b/drivers/mfd/sec-core.c
@@ -230,13 +230,12 @@ static int sec_pmic_probe(struct i2c_client *i2c,
BUG();
}

- if (ret < 0)
+ if (ret)
goto err;

return ret;

err:
- mfd_remove_devices(sec_pmic->dev);
sec_irq_exit(sec_pmic);
i2c_unregister_device(sec_pmic->rtc);
return ret;
--
1.8.1.5


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