mfd: sec-core: Remove explicit call to mfd_remove_devices
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>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c
index 77ee26ef..cc896d1 100644
--- a/drivers/mfd/sec-core.c
+++ b/drivers/mfd/sec-core.c
@@ -230,13 +230,12 @@
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;