All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usb: misc: usb3503: Update error code in print message
@ 2014-06-17 11:08 Tushar Behera
  2014-06-17 11:24 ` Marek Szyprowski
  0 siblings, 1 reply; 4+ messages in thread
From: Tushar Behera @ 2014-06-17 11:08 UTC (permalink / raw)
  To: linux-kernel, linux-usb; +Cc: gregkh, m.szyprowski, trblinux

'err' is uninitialized, rather print the error code directly.

This also fixes following warning.
drivers/usb/misc/usb3503.c: In function ‘usb3503_probe’:
drivers/usb/misc/usb3503.c:195:11: warning: ‘err’ may be used uninitialized
in this function [-Wmaybe-uninitialized]
    dev_err(dev, "unable to request refclk (%d)\n", err);

Signed-off-by: Tushar Behera <tushar.b@samsung.com>
---

Based on next-20140616.

 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..652855b 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);
 		}
 
-- 
1.7.9.5


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

end of thread, other threads:[~2014-06-23 16:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-17 11:08 [PATCH] usb: misc: usb3503: Update error code in print message Tushar Behera
2014-06-17 11:24 ` Marek Szyprowski
2014-06-23  6:17   ` Tushar Behera
2014-06-23 16:18     ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.