aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/max8997.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mfd/max8997.c')
-rw-r--r--drivers/mfd/max8997.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/mfd/max8997.c b/drivers/mfd/max8997.c
index 1b80e51c2e73..10141698ff94 100644
--- a/drivers/mfd/max8997.c
+++ b/drivers/mfd/max8997.c
@@ -228,18 +228,19 @@ static int max8997_i2c_probe(struct i2c_client *i2c,
228 228
229 max8997_irq_init(max8997); 229 max8997_irq_init(max8997);
230 230
231 mfd_add_devices(max8997->dev, -1, max8997_devs, 231 ret = mfd_add_devices(max8997->dev, -1, max8997_devs,
232 ARRAY_SIZE(max8997_devs), 232 ARRAY_SIZE(max8997_devs),
233 NULL, 0, NULL); 233 NULL, 0, NULL);
234 if (ret < 0) {
235 dev_err(max8997->dev, "failed to add MFD devices %d\n", ret);
236 goto err_mfd;
237 }
234 238
235 /* 239 /*
236 * TODO: enable others (flash, muic, rtc, battery, ...) and 240 * TODO: enable others (flash, muic, rtc, battery, ...) and
237 * check the return value 241 * check the return value
238 */ 242 */
239 243
240 if (ret < 0)
241 goto err_mfd;
242
243 /* MAX8997 has a power button input. */ 244 /* MAX8997 has a power button input. */
244 device_init_wakeup(max8997->dev, pdata->wakeup); 245 device_init_wakeup(max8997->dev, pdata->wakeup);
245 246