[PATCH 3.16 351/366] usb: misc: usb3503: Update error code in print message

From: Ben Hutchings
Date: Sun Nov 11 2018 - 15:34:38 EST


3.16.61-rc1 review patch. If anyone has any objections, please let me know.

------------------

From: Tushar Behera <tushar.b@xxxxxxxxxxx>

commit ec5734c41bee2ee7c938a8f34853d31cada7e67a upstream.

'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@xxxxxxxxxxx>
Acked-by: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Signed-off-by: Ben Hutchings <ben@xxxxxxxxxxxxxxx>
---
drivers/usb/misc/usb3503.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

--- a/drivers/usb/misc/usb3503.c
+++ b/drivers/usb/misc/usb3503.c
@@ -192,7 +192,8 @@ static int usb3503_probe(struct usb3503

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);
}