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: <20160911083625.7451-1-colin.king@canonical.com>
Date:   Sun, 11 Sep 2016 09:36:25 +0100
From:   Colin King <colin.king@...onical.com>
To:     Linus Walleij <linus.walleij@...aro.org>,
        Andrew Jeffery <andrew@...id.au>,
        Joel Stanley <joel@....id.au>, linux-gpio@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org
Subject: [PATCH] pinctrl: ret needs to be an int for -ve return value from regmap_update_bits

From: Colin Ian King <colin.king@...onical.com>

Macro regmap_update_bits can return a -ve on an error value so ret
needs to be an integer rather than a bool type.

Fixes warning found by static analysis with cppcheck:
[drivers/pinctrl/aspeed/pinctrl-aspeed.c:192]: (warning) Comparison of
  a boolean expression with an integer other than 0 or 1.

Signed-off-by: Colin Ian King <colin.king@...onical.com>
---
 drivers/pinctrl/aspeed/pinctrl-aspeed.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/aspeed/pinctrl-aspeed.c b/drivers/pinctrl/aspeed/pinctrl-aspeed.c
index 7d461fc..75935ab 100644
--- a/drivers/pinctrl/aspeed/pinctrl-aspeed.c
+++ b/drivers/pinctrl/aspeed/pinctrl-aspeed.c
@@ -166,7 +166,7 @@ static bool aspeed_sig_expr_set(const struct aspeed_sig_expr *expr,
 				bool enable, struct regmap *map)
 {
 	int i;
-	bool ret;
+	int ret;
 
 	ret = aspeed_sig_expr_eval(expr, enable, map);
 	if (ret)
-- 
2.9.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ