Re: [PATCH 2/6] mmc: sdhci-bcm-kona: Handle error from mmc_of_parse()

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

 



2014-12-18 1:41 GMT-08:00 Ulf Hansson <ulf.hansson@xxxxxxxxxx>:
> Since mmc_of_parse() may fail, let's deal with it and thus do proper
> error handling.
>
> Cc: Christian Daudt <bcm@xxxxxxxxxxxxx>
> Cc: Matt Porter <mporter@xxxxxxxxxx>
> Cc: Florian Fainelli <f.fainelli@xxxxxxxxx>
> Signed-off-by: Ulf Hansson <ulf.hansson@xxxxxxxxxx>

Acked-by: Florian Fainelli <f.fainelli@xxxxxxxxx>

> ---
>  drivers/mmc/host/sdhci-bcm-kona.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/sdhci-bcm-kona.c b/drivers/mmc/host/sdhci-bcm-kona.c
> index e7e4fbd..34bb8f9 100644
> --- a/drivers/mmc/host/sdhci-bcm-kona.c
> +++ b/drivers/mmc/host/sdhci-bcm-kona.c
> @@ -254,7 +254,9 @@ static int sdhci_bcm_kona_probe(struct platform_device *pdev)
>         kona_dev = sdhci_pltfm_priv(pltfm_priv);
>         mutex_init(&kona_dev->write_lock);
>
> -       mmc_of_parse(host->mmc);
> +       ret = mmc_of_parse(host->mmc);
> +       if (ret)
> +               goto err_pltfm_free;
>
>         if (!host->mmc->f_max) {
>                 dev_err(&pdev->dev, "Missing max-freq for SDHCI cfg\n");
> --
> 1.9.1
>



-- 
Florian
--
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