Skip to content

Commit

Permalink
rtc: rv3028: Add missed check for devm_regmap_init_i2c()
Browse files Browse the repository at this point in the history
rv3028_probe() misses a check for devm_regmap_init_i2c().
Add the missed check to fix it.

Fixes: e6e7376 ("rtc: rv3028: add new driver")
Signed-off-by: Chuhong Yuan <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
  • Loading branch information
WillLester authored and alexandrebelloni committed May 30, 2020
1 parent 710e4a8 commit c3b29bf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/rtc/rtc-rv3028.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit c3b29bf

Please sign in to comment.