Skip to contentSkip to conversation

rtc: rv3028: add the missed check for devm_regmap_init_i2c

PATCH Applied Chuhong Yuan 2 participants 2 messages May 27, 2020 – May 30, 2020 Real time clock (RTC)

v1 of 2 Applied Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rtc: rv3028: add the missed check for devm_regmap_init_i2c

rv3028_probe() misses a check for devm_regmap_init_i2c(). Add the missed check to fix it.

---
 drivers/rtc/rtc-rv3028.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/rtc/rtc-rv3028.c +2 -0
index a0ddc86c975a..ec84db0b3d7a 100644
@@ -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);
 
Signature · 1 line
2.26.2
maintainer Applied
#1 lore raw
Quoted 2 lines · Chuhong Yuan

rv3028_probe() misses a check for devm_regmap_init_i2c(). Add the missed check to fix it.

Applied, thanks!

[1/1] rtc: rv3028: add the missed check for devm_regmap_init_i2c

Best regards,

Signature · 1 line
Alexandre Belloni <[email protected]>