projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f4fbb59
)
rtc: rv3028: Add missed check for devm_regmap_init_i2c()
author
Chuhong Yuan
<hslester96@gmail.com>
Thu, 28 May 2020 10:39:50 +0000
(18:39 +0800)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Wed, 24 Jun 2020 15:50:36 +0000
(17:50 +0200)
[ Upstream commit
c3b29bf6f166f6ed5f04f9c125477358e0e25df8
]
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
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/rtc/rtc-rv3028.c
patch
|
blob
|
history
diff --git
a/drivers/rtc/rtc-rv3028.c
b/drivers/rtc/rtc-rv3028.c
index
2b31666
..
bbdfebd
100644
(file)
--- a/
drivers/rtc/rtc-rv3028.c
+++ b/
drivers/rtc/rtc-rv3028.c
@@
-625,6
+625,8
@@
static int rv3028_probe(struct i2c_client *client)
return -ENOMEM;
rv3028->regmap = devm_regmap_init_i2c(client, ®map_config);
+ if (IS_ERR(rv3028->regmap))
+ return PTR_ERR(rv3028->regmap);
i2c_set_clientdata(client, rv3028);