From: Shawn Lin <shawn.lin@rock-chips.com>
To: Jaehoon Chung <jh80.chung@samsung.com>, linux-mmc@vger.kernel.org
Cc: shawn.lin@rock-chips.com, ulf.hansson@linaro.org
Subject: Re: [PATCH] mmc: dw_mmc: remove the unnecessary IS_ERR() checking for ciu/biu clock
Date: Fri, 15 Jul 2016 10:07:44 +0800 [thread overview]
Message-ID: <b0aa3a82-2d2b-270d-22a5-1d6573c95c57@rock-chips.com> (raw)
In-Reply-To: <1468547648-4458-1-git-send-email-jh80.chung@samsung.com>
在 2016/7/15 9:54, Jaehoon Chung 写道:
> If ciu/biu clock are NULL, clk_disable_unprepare should be just
> returned. In clk_disable_unprepare(), already checked whether clk is
> error or NULL.
>
> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
That's a good catch.
Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com>
> ---
> drivers/mmc/host/dw_mmc.c | 13 ++++---------
> 1 file changed, 4 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index 2dfdc58..9fab5ed 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -3184,12 +3184,10 @@ err_dmaunmap:
> host->dma_ops->exit(host);
>
> err_clk_ciu:
> - if (!IS_ERR(host->ciu_clk))
> - clk_disable_unprepare(host->ciu_clk);
> + clk_disable_unprepare(host->ciu_clk);
>
> err_clk_biu:
> - if (!IS_ERR(host->biu_clk))
> - clk_disable_unprepare(host->biu_clk);
> + clk_disable_unprepare(host->biu_clk);
>
> return ret;
> }
> @@ -3215,11 +3213,8 @@ void dw_mci_remove(struct dw_mci *host)
> if (host->use_dma && host->dma_ops->exit)
> host->dma_ops->exit(host);
>
> - if (!IS_ERR(host->ciu_clk))
> - clk_disable_unprepare(host->ciu_clk);
> -
> - if (!IS_ERR(host->biu_clk))
> - clk_disable_unprepare(host->biu_clk);
> + clk_disable_unprepare(host->ciu_clk);
> + clk_disable_unprepare(host->biu_clk);
> }
> EXPORT_SYMBOL(dw_mci_remove);
>
>
--
Best Regards
Shawn Lin
next prev parent reply other threads:[~2016-07-15 2:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-15 1:54 [PATCH] mmc: dw_mmc: remove the unnecessary IS_ERR() checking for ciu/biu clock Jaehoon Chung
2016-07-15 2:07 ` Shawn Lin [this message]
2016-07-26 0:50 ` Jaehoon Chung
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=b0aa3a82-2d2b-270d-22a5-1d6573c95c57@rock-chips.com \
--to=shawn.lin@rock-chips.com \
--cc=jh80.chung@samsung.com \
--cc=linux-mmc@vger.kernel.org \
--cc=ulf.hansson@linaro.org \
/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.