From: Emil Goode <emilgoode@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Mark Brown <broonie@linaro.org>, Olof Johansson <olof@lixom.net>,
Dongjin Kim <tobetter@gmail.com>,
Julius Werner <jwerner@chromium.org>,
Marek Szyprowski <m.szyprowski@samsung.com>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org, Emil Goode <emilgoode@gmail.com>
Subject: [PATCH] usb: usb5303: make use of uninitialized err variable
Date: Mon, 02 Jun 2014 17:45:25 +0000 [thread overview]
Message-ID: <1401731125-19780-1-git-send-email-emilgoode@gmail.com> (raw)
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@gmail.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
next reply other threads:[~2014-06-02 17:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-02 17:45 Emil Goode [this message]
2014-06-11 19:02 ` [PATCH] usb: usb5303: make use of uninitialized err variable Geert Uytterhoeven
2014-07-09 22:46 ` Greg Kroah-Hartman
2014-07-10 7:38 ` Geert Uytterhoeven
2014-07-10 11:12 ` Emil Goode
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1401731125-19780-1-git-send-email-emilgoode@gmail.com \
--to=emilgoode@gmail.com \
--cc=broonie@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=jwerner@chromium.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=olof@lixom.net \
--cc=tobetter@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox