From: Jaehoon Chung <jh80.chung@samsung.com>
To: Shawn Lin <shawn.lin@rock-chips.com>, linux-mmc@vger.kernel.org
Cc: ulf.hansson@linaro.org
Subject: Re: [PATCH] mmc: dw_mmc: remove the unnecessary IS_ERR() checking for ciu/biu clock
Date: Tue, 26 Jul 2016 09:50:12 +0900 [thread overview]
Message-ID: <5796B3C4.9080709@samsung.com> (raw)
In-Reply-To: <b0aa3a82-2d2b-270d-22a5-1d6573c95c57@rock-chips.com>
On 07/15/2016 11:07 AM, Shawn Lin wrote:
> 在 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>
Applied on my repository. Thanks!
Best Regards,
Jaehoon Chung
>
>> ---
>> 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);
>>
>>
>
>
prev parent reply other threads:[~2016-07-26 0:50 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
2016-07-26 0:50 ` Jaehoon Chung [this message]
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=5796B3C4.9080709@samsung.com \
--to=jh80.chung@samsung.com \
--cc=linux-mmc@vger.kernel.org \
--cc=shawn.lin@rock-chips.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).