* [PATCH] mmc: dw_mmc: Pass back errors from mmc_of_parse()
@ 2014-08-25 18:19 Doug Anderson
2014-08-27 4:13 ` Jaehoon Chung
2014-08-29 11:59 ` Ulf Hansson
0 siblings, 2 replies; 3+ messages in thread
From: Doug Anderson @ 2014-08-25 18:19 UTC (permalink / raw)
To: Ulf Hansson
Cc: Addy Ke, olof, Sonny Rao, Jaehoon Chung, Seungwon Jeon,
Chris Ball, Yuvaraj Kumar C D, Doug Anderson, chris, linux-mmc,
linux-kernel
It's possible that mmc_of_parse() could return errors (possibly in
some future version it might return -EPROBE_DEFER even). Let's pass
those errors back.
Signed-off-by: Doug Anderson <dianders@chromium.org>
---
drivers/mmc/host/dw_mmc.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 7f227e9..9ef4df0 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -2131,7 +2131,9 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id)
if (host->pdata->caps2)
mmc->caps2 = host->pdata->caps2;
- mmc_of_parse(mmc);
+ ret = mmc_of_parse(mmc);
+ if (ret)
+ goto err_host_allocated;
if (host->pdata->blk_settings) {
mmc->max_segs = host->pdata->blk_settings->max_segs;
@@ -2163,7 +2165,7 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id)
ret = mmc_add_host(mmc);
if (ret)
- goto err_setup_bus;
+ goto err_host_allocated;
#if defined(CONFIG_DEBUG_FS)
dw_mci_init_debugfs(slot);
@@ -2174,9 +2176,9 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id)
return 0;
-err_setup_bus:
+err_host_allocated:
mmc_free_host(mmc);
- return -EINVAL;
+ return ret;
}
static void dw_mci_cleanup_slot(struct dw_mci_slot *slot, unsigned int id)
--
2.1.0.rc2.206.gedb03e5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mmc: dw_mmc: Pass back errors from mmc_of_parse()
2014-08-25 18:19 [PATCH] mmc: dw_mmc: Pass back errors from mmc_of_parse() Doug Anderson
@ 2014-08-27 4:13 ` Jaehoon Chung
2014-08-29 11:59 ` Ulf Hansson
1 sibling, 0 replies; 3+ messages in thread
From: Jaehoon Chung @ 2014-08-27 4:13 UTC (permalink / raw)
To: Doug Anderson, Ulf Hansson
Cc: Addy Ke, olof, Sonny Rao, Jaehoon Chung, Seungwon Jeon,
Chris Ball, Yuvaraj Kumar C D, chris, linux-mmc, linux-kernel
Looks good to me.
Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
Best Regards,
Jaehoon Chung
On 08/26/2014 03:19 AM, Doug Anderson wrote:
> It's possible that mmc_of_parse() could return errors (possibly in
> some future version it might return -EPROBE_DEFER even). Let's pass
> those errors back.
>
> Signed-off-by: Doug Anderson <dianders@chromium.org>
> ---
> drivers/mmc/host/dw_mmc.c | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index 7f227e9..9ef4df0 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -2131,7 +2131,9 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id)
> if (host->pdata->caps2)
> mmc->caps2 = host->pdata->caps2;
>
> - mmc_of_parse(mmc);
> + ret = mmc_of_parse(mmc);
> + if (ret)
> + goto err_host_allocated;
>
> if (host->pdata->blk_settings) {
> mmc->max_segs = host->pdata->blk_settings->max_segs;
> @@ -2163,7 +2165,7 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id)
>
> ret = mmc_add_host(mmc);
> if (ret)
> - goto err_setup_bus;
> + goto err_host_allocated;
>
> #if defined(CONFIG_DEBUG_FS)
> dw_mci_init_debugfs(slot);
> @@ -2174,9 +2176,9 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id)
>
> return 0;
>
> -err_setup_bus:
> +err_host_allocated:
> mmc_free_host(mmc);
> - return -EINVAL;
> + return ret;
> }
>
> static void dw_mci_cleanup_slot(struct dw_mci_slot *slot, unsigned int id)
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mmc: dw_mmc: Pass back errors from mmc_of_parse()
2014-08-25 18:19 [PATCH] mmc: dw_mmc: Pass back errors from mmc_of_parse() Doug Anderson
2014-08-27 4:13 ` Jaehoon Chung
@ 2014-08-29 11:59 ` Ulf Hansson
1 sibling, 0 replies; 3+ messages in thread
From: Ulf Hansson @ 2014-08-29 11:59 UTC (permalink / raw)
To: Doug Anderson
Cc: Addy Ke, Olof Johansson, Sonny Rao, Jaehoon Chung, Seungwon Jeon,
Chris Ball, Yuvaraj Kumar C D, Chris Ball, linux-mmc,
linux-kernel@vger.kernel.org
On 25 August 2014 20:19, Doug Anderson <dianders@chromium.org> wrote:
> It's possible that mmc_of_parse() could return errors (possibly in
> some future version it might return -EPROBE_DEFER even). Let's pass
> those errors back.
>
> Signed-off-by: Doug Anderson <dianders@chromium.org>
Thanks! Applied for next.
I needed to resolve to simple conflict, but you still might want to
verify that the end result is what you expected.
Kind regards
Uffe
> ---
> drivers/mmc/host/dw_mmc.c | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index 7f227e9..9ef4df0 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -2131,7 +2131,9 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id)
> if (host->pdata->caps2)
> mmc->caps2 = host->pdata->caps2;
>
> - mmc_of_parse(mmc);
> + ret = mmc_of_parse(mmc);
> + if (ret)
> + goto err_host_allocated;
>
> if (host->pdata->blk_settings) {
> mmc->max_segs = host->pdata->blk_settings->max_segs;
> @@ -2163,7 +2165,7 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id)
>
> ret = mmc_add_host(mmc);
> if (ret)
> - goto err_setup_bus;
> + goto err_host_allocated;
>
> #if defined(CONFIG_DEBUG_FS)
> dw_mci_init_debugfs(slot);
> @@ -2174,9 +2176,9 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id)
>
> return 0;
>
> -err_setup_bus:
> +err_host_allocated:
> mmc_free_host(mmc);
> - return -EINVAL;
> + return ret;
> }
>
> static void dw_mci_cleanup_slot(struct dw_mci_slot *slot, unsigned int id)
> --
> 2.1.0.rc2.206.gedb03e5
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-08-29 12:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-25 18:19 [PATCH] mmc: dw_mmc: Pass back errors from mmc_of_parse() Doug Anderson
2014-08-27 4:13 ` Jaehoon Chung
2014-08-29 11:59 ` Ulf Hansson
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).