[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200528103950.912353-1-hslester96@gmail.com>
Date: Thu, 28 May 2020 18:39:50 +0800
From: Chuhong Yuan <hslester96@...il.com>
To: unlisted-recipients:; (no To-header on input)
Cc: Alessandro Zummo <a.zummo@...ertech.it>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
linux-rtc@...r.kernel.org, linux-kernel@...r.kernel.org,
Chuhong Yuan <hslester96@...il.com>
Subject: [PATCH v2] 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@...il.com>
---
Changes in v2:
- Add fixes tag.
drivers/rtc/rtc-rv3028.c | 2 ++
1 file changed, 2 insertions(+)
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, ®map_config);
+ if (IS_ERR(rv3028->regmap))
+ return PTR_ERR(rv3028->regmap);
i2c_set_clientdata(client, rv3028);
--
2.26.2
Powered by blists - more mailing lists