linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ulf Hansson <ulf.hansson@linaro.org>
To: Doug Anderson <dianders@chromium.org>
Cc: Addy Ke <addy.ke@rock-chips.com>, Olof Johansson <olof@lixom.net>,
	Sonny Rao <sonnyrao@chromium.org>,
	Jaehoon Chung <jh80.chung@samsung.com>,
	Seungwon Jeon <tgih.jun@samsung.com>, Chris Ball <cjb@laptop.org>,
	Yuvaraj Kumar C D <yuvaraj.cd@gmail.com>,
	Chris Ball <chris@printf.net>,
	linux-mmc <linux-mmc@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mmc: dw_mmc: Pass back errors from mmc_of_parse()
Date: Fri, 29 Aug 2014 13:59:59 +0200	[thread overview]
Message-ID: <CAPDyKFrAP2zRDbR5Xx_mstjLRBGARknjeP1UjR8jXMhBABanXg@mail.gmail.com> (raw)
In-Reply-To: <1408990744-1093-1-git-send-email-dianders@chromium.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
>

      parent reply	other threads:[~2014-08-29 12:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAPDyKFrAP2zRDbR5Xx_mstjLRBGARknjeP1UjR8jXMhBABanXg@mail.gmail.com \
    --to=ulf.hansson@linaro.org \
    --cc=addy.ke@rock-chips.com \
    --cc=chris@printf.net \
    --cc=cjb@laptop.org \
    --cc=dianders@chromium.org \
    --cc=jh80.chung@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=olof@lixom.net \
    --cc=sonnyrao@chromium.org \
    --cc=tgih.jun@samsung.com \
    --cc=yuvaraj.cd@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).