public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Emil Goode <emilgoode@gmail.com>
Cc: Mark Brown <broonie@linaro.org>, Olof Johansson <olof@lixom.net>,
	Dongjin Kim <tobetter@gmail.com>,
	Julius Werner <jwerner@chromium.org>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] usb: usb5303: make use of uninitialized err variable
Date: Wed, 9 Jul 2014 15:46:47 -0700	[thread overview]
Message-ID: <20140709224647.GA23929@kroah.com> (raw)
In-Reply-To: <1401731125-19780-1-git-send-email-emilgoode@gmail.com>

On Mon, Jun 02, 2014 at 07:45:25PM +0200, Emil Goode wrote:
> The variable err is not initialized here, this patch uses it
> to store an eventual error value from devm_clk_get().
> 
> Signed-off-by: Emil Goode <emilgoode@gmail.com>
> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
> ---
>  drivers/usb/misc/usb3503.c |   10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/usb/misc/usb3503.c b/drivers/usb/misc/usb3503.c
> index f43c619..c86c3fa 100644
> --- a/drivers/usb/misc/usb3503.c
> +++ b/drivers/usb/misc/usb3503.c
> @@ -191,9 +191,13 @@ static int usb3503_probe(struct usb3503 *hub)
>  		hub->port_off_mask = 0;
>  
>  		clk = devm_clk_get(dev, "refclk");
> -		if (IS_ERR(clk) && PTR_ERR(clk) != -ENOENT) {
> -			dev_err(dev, "unable to request refclk (%d)\n", err);
> -			return PTR_ERR(clk);
> +		if (IS_ERR(clk)) {
> +			err = PTR_ERR(clk);
> +			if (err != -ENOENT) {
> +				dev_err(dev, "unable to request refclk (%d)\n",
> +					err);
> +				return err;
> +			}
>  		}
>  
>  		if (!IS_ERR(clk)) {
> -- 
> 1.7.10.4

This patch fails to apply to my tree :(

  parent reply	other threads:[~2014-07-09 22:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-02 17:45 [PATCH] usb: usb5303: make use of uninitialized err variable Emil Goode
2014-06-11 19:02 ` Geert Uytterhoeven
2014-07-09 22:46 ` Greg Kroah-Hartman [this message]
2014-07-10  7:38   ` Geert Uytterhoeven
2014-07-10 11:12     ` Emil Goode

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=20140709224647.GA23929@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=broonie@linaro.org \
    --cc=emilgoode@gmail.com \
    --cc=jwerner@chromium.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=olof@lixom.net \
    --cc=tobetter@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox