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: <20170630161009.13762-1-arnd@arndb.de>
Date:   Fri, 30 Jun 2017 18:09:53 +0200
From:   Arnd Bergmann <arnd@...db.de>
To:     Linus Walleij <linus.walleij@...aro.org>
Cc:     Arnd Bergmann <arnd@...db.de>,
        Jacopo Mondi <jacopo+renesas@...ndi.org>,
        Geert Uytterhoeven <geert+renesas@...der.be>,
        linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] pinctrl: rza1: fix error handling

A compiler warning points out a typo:

drivers/pinctrl/pinctrl-rza1.c: In function 'rza1_pinctrl_probe':
drivers/pinctrl/pinctrl-rza1.c:1260:5: error: 'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized]

This changes the condition to the usual check for failure of the previous
function call.

Fixes: 5a49b644b307 ("pinctrl: Renesas RZ/A1 pin and gpio controller")
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
 drivers/pinctrl/pinctrl-rza1.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/pinctrl-rza1.c b/drivers/pinctrl/pinctrl-rza1.c
index 614a043f3038..1d57d4480a02 100644
--- a/drivers/pinctrl/pinctrl-rza1.c
+++ b/drivers/pinctrl/pinctrl-rza1.c
@@ -1257,7 +1257,7 @@ static int rza1_pinctrl_probe(struct platform_device *pdev)
 	rza1_pctl->dev = &pdev->dev;
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (ret)
+	if (!res)
 		return -ENODEV;
 
 	rza1_pctl->base = devm_ioremap_resource(&pdev->dev, res);
-- 
2.9.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ