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]
Date:	Mon,  2 Jun 2014 19:45:25 +0200
From:	Emil Goode <emilgoode@...il.com>
To:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Mark Brown <broonie@...aro.org>,
	Olof Johansson <olof@...om.net>,
	Dongjin Kim <tobetter@...il.com>,
	Julius Werner <jwerner@...omium.org>,
	Marek Szyprowski <m.szyprowski@...sung.com>
Cc:	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
	kernel-janitors@...r.kernel.org, Emil Goode <emilgoode@...il.com>
Subject: [PATCH] usb: usb5303: make use of uninitialized err variable

The variable err is not initialized here, this patch uses it
to store an eventual error value from devm_clk_get().

Signed-off-by: Emil Goode <emilgoode@...il.com>
---
 drivers/usb/misc/usb3503.c |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/misc/usb3503.c b/drivers/usb/misc/usb3503.c
index f43c619..c86c3fa 100644
--- a/drivers/usb/misc/usb3503.c
+++ b/drivers/usb/misc/usb3503.c
@@ -191,9 +191,13 @@ static int usb3503_probe(struct usb3503 *hub)
 		hub->port_off_mask = 0;
 
 		clk = devm_clk_get(dev, "refclk");
-		if (IS_ERR(clk) && PTR_ERR(clk) != -ENOENT) {
-			dev_err(dev, "unable to request refclk (%d)\n", err);
-			return PTR_ERR(clk);
+		if (IS_ERR(clk)) {
+			err = PTR_ERR(clk);
+			if (err != -ENOENT) {
+				dev_err(dev, "unable to request refclk (%d)\n",
+					err);
+				return err;
+			}
 		}
 
 		if (!IS_ERR(clk)) {
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ