Re: [PATCH] mmc: dw_mmc: remove the unnecessary IS_ERR() checking for ciu/biu clock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx>
> 
> That's a good catch.
> 
> Reviewed-by: Shawn Lin <shawn.lin@xxxxxxxxxxxxxx>

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);
>>
>>
> 
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux