summaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-rv3028.c
diff options
context:
space:
mode:
authorChuhong Yuan <hslester96@gmail.com>2020-05-28 12:39:50 +0200
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2020-05-30 04:12:43 +0200
commitc3b29bf6f166f6ed5f04f9c125477358e0e25df8 (patch)
tree85fcbb3a08bc95708ba703ea1b6a59bc2489352f /drivers/rtc/rtc-rv3028.c
parentrtc: mpc5121: Use correct return value for mpc5121_rtc_probe() (diff)
downloadlinux-c3b29bf6f166f6ed5f04f9c125477358e0e25df8.tar.xz
linux-c3b29bf6f166f6ed5f04f9c125477358e0e25df8.zip
rtc: rv3028: Add missed check for devm_regmap_init_i2c()
rv3028_probe() misses a check for devm_regmap_init_i2c(). Add the missed check to fix it. Fixes: e6e7376cfd7b ("rtc: rv3028: add new driver") Signed-off-by: Chuhong Yuan <hslester96@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20200528103950.912353-1-hslester96@gmail.com
Diffstat (limited to 'drivers/rtc/rtc-rv3028.c')
-rw-r--r--drivers/rtc/rtc-rv3028.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/rtc/rtc-rv3028.c b/drivers/rtc/rtc-rv3028.c
index a0ddc86c975a..ec84db0b3d7a 100644
--- a/drivers/rtc/rtc-rv3028.c
+++ b/drivers/rtc/rtc-rv3028.c
@@ -755,6 +755,8 @@ static int rv3028_probe(struct i2c_client *client)
return -ENOMEM;
rv3028->regmap = devm_regmap_init_i2c(client, &regmap_config);
+ if (IS_ERR(rv3028->regmap))
+ return PTR_ERR(rv3028->regmap);
i2c_set_clientdata(client, rv3028);