diff mbox

[1/5,RFC] mmc: sdhci-iproc: Clean up platform allocations if shdci init fails

Message ID 1453042744-16196-2-git-send-email-stefan.wahren@i2se.com (mailing list archive)
State New, archived
Headers show

Commit Message

Stefan Wahren Jan. 17, 2016, 2:59 p.m. UTC
This patch adopts the changes from 475c9e43bfa7 ("mmc: sdhci-bcm2835: 
Clean up platform allocations if sdhci init fails") to sdhci-iproc.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
 drivers/mmc/host/sdhci-iproc.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

Scott Branden Jan. 18, 2016, 9:31 p.m. UTC | #1
This patch looks fine.

On 16-01-17 06:59 AM, Stefan Wahren wrote:
> This patch adopts the changes from 475c9e43bfa7 ("mmc: sdhci-bcm2835:
> Clean up platform allocations if sdhci init fails") to sdhci-iproc.
>
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Acked-by: Scott Branden <sbranden@broadcom.com>

> ---
>   drivers/mmc/host/sdhci-iproc.c |    6 +++++-
>   1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/sdhci-iproc.c b/drivers/mmc/host/sdhci-iproc.c
> index 3b423b0..e22060a 100644
> --- a/drivers/mmc/host/sdhci-iproc.c
> +++ b/drivers/mmc/host/sdhci-iproc.c
> @@ -213,7 +213,11 @@ static int sdhci_iproc_probe(struct platform_device *pdev)
>   		host->caps1 = iproc_host->data->caps1;
>   	}
>
> -	return sdhci_add_host(host);
> +	ret = sdhci_add_host(host);
> +	if (ret)
> +		goto err;
> +
> +	return 0;
>
>   err:
>   	sdhci_pltfm_free(pdev);
>

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Ulf Hansson Jan. 27, 2016, 2:16 p.m. UTC | #2
On 17 January 2016 at 15:59, Stefan Wahren <stefan.wahren@i2se.com> wrote:
> This patch adopts the changes from 475c9e43bfa7 ("mmc: sdhci-bcm2835:
> Clean up platform allocations if sdhci init fails") to sdhci-iproc.
>
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>

Thanks, applied for next!

Kind regards
Uffe

> ---
>  drivers/mmc/host/sdhci-iproc.c |    6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/sdhci-iproc.c b/drivers/mmc/host/sdhci-iproc.c
> index 3b423b0..e22060a 100644
> --- a/drivers/mmc/host/sdhci-iproc.c
> +++ b/drivers/mmc/host/sdhci-iproc.c
> @@ -213,7 +213,11 @@ static int sdhci_iproc_probe(struct platform_device *pdev)
>                 host->caps1 = iproc_host->data->caps1;
>         }
>
> -       return sdhci_add_host(host);
> +       ret = sdhci_add_host(host);
> +       if (ret)
> +               goto err;
> +
> +       return 0;
>
>  err:
>         sdhci_pltfm_free(pdev);
> --
> 1.7.9.5
>
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/mmc/host/sdhci-iproc.c b/drivers/mmc/host/sdhci-iproc.c
index 3b423b0..e22060a 100644
--- a/drivers/mmc/host/sdhci-iproc.c
+++ b/drivers/mmc/host/sdhci-iproc.c
@@ -213,7 +213,11 @@  static int sdhci_iproc_probe(struct platform_device *pdev)
 		host->caps1 = iproc_host->data->caps1;
 	}
 
-	return sdhci_add_host(host);
+	ret = sdhci_add_host(host);
+	if (ret)
+		goto err;
+
+	return 0;
 
 err:
 	sdhci_pltfm_free(pdev);