[U-Boot] [PATCH v2 09/13] mmc: sdhci: Make set_ios_post() return int
Rizvi, Mohammad Faiz Abbas
faiz_abbas at ti.com
Mon Feb 11 17:27:12 UTC 2019
Hi Tom,
On 2/7/2019 5:16 AM, Tom Rini wrote:
> On Tue, Feb 05, 2019 at 07:42:57PM +0530, Faiz Abbas wrote:
>
>> Make set_ios_post() return int to faciliate error handling in
>> platform drivers.
>>
>> Signed-off-by: Faiz Abbas <faiz4000 at gmail.com>
>> ---
>> drivers/mmc/sdhci.c | 8 ++++++--
>> drivers/mmc/xenon_sdhci.c | 4 +++-
>> include/sdhci.h | 2 +-
>> 3 files changed, 10 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
>> index 635f5396c4..45576502aa 100644
>> --- a/drivers/mmc/sdhci.c
>> +++ b/drivers/mmc/sdhci.c
>> @@ -461,6 +461,7 @@ static int sdhci_set_ios(struct mmc *mmc)
>> #endif
>> u32 ctrl;
>> struct sdhci_host *host = mmc->priv;
>> + int ret;
>>
>> if (host->ops && host->ops->set_control_reg)
>> host->ops->set_control_reg(host);
>> @@ -500,8 +501,11 @@ static int sdhci_set_ios(struct mmc *mmc)
>> sdhci_writeb(host, ctrl, SDHCI_HOST_CONTROL);
>>
>> /* If available, call the driver specific "post" set_ios() function */
>> - if (host->ops && host->ops->set_ios_post)
>> - host->ops->set_ios_post(host);
>> + if (host->ops && host->ops->set_ios_post) {
>> + ret = host->ops->set_ios_post(host);
>> + if (ret)
>> + return ret;
>> + }
>
> We don't need to add ret, we just return host->ops->set_ios_post(host);
>
Ok. Got it.
Thanks,
Faiz
More information about the U-Boot
mailing list