mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] usb: usb3503: return correct error return on failure
@ 2014-06-29 21:42 Colin King
  2014-06-30  1:04 ` Jingoo Han
  2014-07-09 23:13 ` Greg Kroah-Hartman
  0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2014-06-29 21:42 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Mark Brown, Jingoo Han, linux-usb; +Cc: linux-kernel

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

Fix warning: drivers/usb/misc/usb3503.c:195:11: warning: 'err'
  may be used uninitialized in this function [-Wmaybe-uninitialized]

err is not initialized, the error return should be PTR_ERR(clk)

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/usb/misc/usb3503.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/misc/usb3503.c b/drivers/usb/misc/usb3503.c
index f43c619..c0c898d 100644
--- a/drivers/usb/misc/usb3503.c
+++ b/drivers/usb/misc/usb3503.c
@@ -192,7 +192,8 @@ static int usb3503_probe(struct usb3503 *hub)
 
 		clk = devm_clk_get(dev, "refclk");
 		if (IS_ERR(clk) && PTR_ERR(clk) != -ENOENT) {
-			dev_err(dev, "unable to request refclk (%d)\n", err);
+			dev_err(dev, "unable to request refclk (%ld)\n",
+				PTR_ERR(clk));
 			return PTR_ERR(clk);
 		}
 
-- 
2.0.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-07-09 23:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-29 21:42 [PATCH] usb: usb3503: return correct error return on failure Colin King
2014-06-30  1:04 ` Jingoo Han
2014-07-09 23:13 ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome