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>
This commit is contained in:
Leon Romanovsky 2013-05-15 18:00:48 +03:00 committed by Samuel Ortiz
parent 45fcac1aad
commit 15447a46a5
1 changed files with 1 additions and 2 deletions

View File

@ -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;