usb: misc: usb3503: Update error code in print message
authorTushar Behera <tushar.b@samsung.com>
Tue, 17 Jun 2014 11:08:50 +0000 (16:38 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Jul 2014 22:41:02 +0000 (15:41 -0700)
'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>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/misc/usb3503.c

index f43c61989cef2c1ce64576712162fc79eb62d316..652855b40289d22e413340c097876e94c50e529d 100644 (file)
@@ -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);
                }