X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=drivers%2Fmfd%2Fmax8998.c;h=592db06098e69eabeb08c506cb3409c6d2ff2ca9;hb=190a3998be3ede25d6145e187d6d321f504d28fb;hp=5d5e186b5d8bbbfed035725480fb85dc52a0fdb4;hpb=0f1b1e6d73cb989ce2c071edc57deade3b084dfe;p=karo-tx-linux.git diff --git a/drivers/mfd/max8998.c b/drivers/mfd/max8998.c index 5d5e186b5d8b..592db06098e6 100644 --- a/drivers/mfd/max8998.c +++ b/drivers/mfd/max8998.c @@ -215,6 +215,10 @@ static int max8998_i2c_probe(struct i2c_client *i2c, mutex_init(&max8998->iolock); max8998->rtc = i2c_new_dummy(i2c->adapter, RTC_I2C_ADDR); + if (!max8998->rtc) { + dev_err(&i2c->dev, "Failed to allocate I2C device for RTC\n"); + return -ENODEV; + } i2c_set_clientdata(max8998->rtc, max8998); max8998_irq_init(max8998);