All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Szyprowski <m.szyprowski@samsung.com>
To: Tushar Behera <tushar.b@samsung.com>,
	linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org
Cc: gregkh@linuxfoundation.org, trblinux@gmail.com
Subject: Re: [PATCH] usb: misc: usb3503: Update error code in print message
Date: Tue, 17 Jun 2014 13:24:26 +0200	[thread overview]
Message-ID: <53A0256A.2000904@samsung.com> (raw)
In-Reply-To: <1403003330-17553-1-git-send-email-tushar.b@samsung.com>

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


  reply	other threads:[~2014-06-17 11:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-17 11:08 [PATCH] usb: misc: usb3503: Update error code in print message Tushar Behera
2014-06-17 11:24 ` Marek Szyprowski [this message]
2014-06-23  6:17   ` Tushar Behera
2014-06-23 16:18     ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53A0256A.2000904@samsung.com \
    --to=m.szyprowski@samsung.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=trblinux@gmail.com \
    --cc=tushar.b@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.