lkml.org 
[lkml]   [2014]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] usb: misc: usb3503: Update error code in print message
Hello,

On 2014-06-17 13:08, Tushar Behera wrote:
> '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>

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

Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2014-06-17 14:01    [W:0.092 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site