All of lore.kernel.org
 help / color / mirror / Atom feed
From: Huang Shijie <b32955@freescale.com>
To: "Michał Mirosław" <mirq-linux@rere.qmqm.pl>
Cc: David Woodhouse <dwmw2@infradead.org>,
	Shawn Guo <shawn.guo@linaro.org>,
	linux-mtd@lists.infradead.org,
	Bill Pemberton <wfp5p@virginia.edu>
Subject: Re: [PATCH] mxs/gpmi-nand: fix error return from gpmi_get_clks()
Date: Mon, 6 May 2013 16:20:49 +0800	[thread overview]
Message-ID: <518767E1.5020201@freescale.com> (raw)
In-Reply-To: <135ba9f94ed78b589a8576dc14f8b720d8425891.1367673436.git.mirq-linux@rere.qmqm.pl>

于 2013年05月04日 21:19, Michał Mirosław 写道:
> Signed-off-by: Michał Mirosław<mirq-linux@rere.qmqm.pl>
> ---
>   drivers/mtd/nand/gpmi-nand/gpmi-nand.c |   12 ++++++++----
>   1 file changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
> index 25ecfa1..1d18efc 100644
> --- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
> +++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
> @@ -473,12 +473,14 @@ static int gpmi_get_clks(struct gpmi_nand_data *this)
>   	struct resources *r =&this->resources;
>   	char **extra_clks = NULL;
>   	struct clk *clk;
> -	int i;
> +	int err, i;
>
>   	/* The main clock is stored in the first. */
>   	r->clock[0] = clk_get(this->dev, "gpmi_io");
> -	if (IS_ERR(r->clock[0]))
> +	if (IS_ERR(r->clock[0])) {
> +		err = PTR_ERR(r->clock[0]);
>   		goto err_clock;
> +	}
>
>   	/* Get extra clocks */
>   	if (GPMI_IS_MX6Q(this))
> @@ -491,8 +493,10 @@ static int gpmi_get_clks(struct gpmi_nand_data *this)
>   			break;
>
>   		clk = clk_get(this->dev, extra_clks[i - 1]);
> -		if (IS_ERR(clk))
> +		if (IS_ERR(clk)) {
> +			err = PTR_ERR(clk);
>   			goto err_clock;
> +		}
>
>   		r->clock[i] = clk;
>   	}
> @@ -511,7 +515,7 @@ static int gpmi_get_clks(struct gpmi_nand_data *this)
>   err_clock:
>   	dev_dbg(this->dev, "failed in finding the clocks.\n");
>   	gpmi_put_clks(this);
> -	return -ENOMEM;
> +	return err;
>   }
>
>   static int acquire_resources(struct gpmi_nand_data *this)
Acked-by: Huang Shijie <b32955@freescale.com>

  reply	other threads:[~2013-05-06  8:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-04 13:19 [PATCH] mxs/gpmi-nand: fix error return from gpmi_get_clks() Michał Mirosław
2013-05-06  8:20 ` Huang Shijie [this message]
2013-07-01  5:15 ` Artem Bityutskiy

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=518767E1.5020201@freescale.com \
    --to=b32955@freescale.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=mirq-linux@rere.qmqm.pl \
    --cc=shawn.guo@linaro.org \
    --cc=wfp5p@virginia.edu \
    /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.