diff options
-rw-r--r-- | drivers/mfd/max8998.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mfd/max8998.c b/drivers/mfd/max8998.c index d7218cc90945..8381a76c69c0 100644 --- a/drivers/mfd/max8998.c +++ b/drivers/mfd/max8998.c | |||
@@ -152,6 +152,10 @@ static int max8998_i2c_probe(struct i2c_client *i2c, | |||
152 | mutex_init(&max8998->iolock); | 152 | mutex_init(&max8998->iolock); |
153 | 153 | ||
154 | max8998->rtc = i2c_new_dummy(i2c->adapter, RTC_I2C_ADDR); | 154 | max8998->rtc = i2c_new_dummy(i2c->adapter, RTC_I2C_ADDR); |
155 | if (!max8998->rtc) { | ||
156 | dev_err(&i2c->dev, "Failed to allocate I2C device for RTC\n"); | ||
157 | return -ENODEV; | ||
158 | } | ||
155 | i2c_set_clientdata(max8998->rtc, max8998); | 159 | i2c_set_clientdata(max8998->rtc, max8998); |
156 | 160 | ||
157 | max8998_irq_init(max8998); | 161 | max8998_irq_init(max8998); |