lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1559114540-30878-1-git-send-email-wangxidong_97@163.com>
Date:   Wed, 29 May 2019 15:22:20 +0800
From:   Xidong Wang <wangxidong_97@....com>
To:     Alessandro Zummo <a.zummo@...ertech.it>,
        Alexandre Belloni <alexandre.belloni@...tlin.com>
Cc:     Xidong Wang <wangxidong_97@....com>, linux-rtc@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: [PATCH 1/1] rtc: rv3028: check return value

In rv3028_probe(), the return value of devm_regmap_init_i2c() should
be checked before it is used.

Signed-off-by: Xidong Wang <wangxidong_97@....com>
---
 drivers/rtc/rtc-rv3028.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/rtc/rtc-rv3028.c b/drivers/rtc/rtc-rv3028.c
index 06884eb..29a8c4e 100644
--- a/drivers/rtc/rtc-rv3028.c
+++ b/drivers/rtc/rtc-rv3028.c
@@ -626,6 +626,10 @@ static int rv3028_probe(struct i2c_client *client)
 
 	rv3028->regmap = devm_regmap_init_i2c(client, &regmap_config);
 
+	if (IS_ERR(rv3028->regmap)) {
+		return PTR_ERR(rv3028->regmap);
+	}
+
 	i2c_set_clientdata(client, rv3028);
 
 	ret = regmap_read(rv3028->regmap, RV3028_STATUS, &status);
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ