diff options
-rw-r--r-- | drivers/rtc/rtc-s5m.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/rtc/rtc-s5m.c b/drivers/rtc/rtc-s5m.c index c7f1bf823ea0..eb9dde4095a9 100644 --- a/drivers/rtc/rtc-s5m.c +++ b/drivers/rtc/rtc-s5m.c | |||
@@ -760,10 +760,10 @@ static int s5m_rtc_probe(struct platform_device *pdev) | |||
760 | return -ENODEV; | 760 | return -ENODEV; |
761 | } | 761 | } |
762 | 762 | ||
763 | info->i2c = i2c_new_dummy(s5m87xx->i2c->adapter, RTC_I2C_ADDR); | 763 | info->i2c = i2c_new_dummy_device(s5m87xx->i2c->adapter, RTC_I2C_ADDR); |
764 | if (!info->i2c) { | 764 | if (IS_ERR(info->i2c)) { |
765 | dev_err(&pdev->dev, "Failed to allocate I2C for RTC\n"); | 765 | dev_err(&pdev->dev, "Failed to allocate I2C for RTC\n"); |
766 | return -ENODEV; | 766 | return PTR_ERR(info->i2c); |
767 | } | 767 | } |
768 | 768 | ||
769 | info->regmap = devm_regmap_init_i2c(info->i2c, regmap_cfg); | 769 | info->regmap = devm_regmap_init_i2c(info->i2c, regmap_cfg); |