All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ulf Hansson <ulf.hansson@linaro.org>
To: Heiner Kallweit <hkallweit1@gmail.com>
Cc: "linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>
Subject: Re: [PATCH 2/2] mmc: core: fix error path in mmc_host_alloc
Date: Mon, 30 Jan 2017 11:05:40 +0100	[thread overview]
Message-ID: <CAPDyKFrkj-OZtFr_fxJvFzwB73ugYX8Qz96rt15H5mFuEhnv_A@mail.gmail.com> (raw)
In-Reply-To: <92cb6f74-a354-d4ab-6e40-1d985526e68f@gmail.com>

On 28 January 2017 at 09:32, Heiner Kallweit <hkallweit1@gmail.com> wrote:
> Properly reverse everything if mmc_gpio_alloc(host) fails.
>
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

Thanks, applied for next!

Kind regards
Uffe

> ---
>  drivers/mmc/core/host.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c
> index 0a26c8b6..19c68bf2 100644
> --- a/drivers/mmc/core/host.c
> +++ b/drivers/mmc/core/host.c
> @@ -369,6 +369,8 @@ struct mmc_host *mmc_alloc_host(int extra, struct device *dev)
>
>         if (mmc_gpio_alloc(host)) {
>                 put_device(&host->class_dev);
> +               ida_simple_remove(&mmc_host_ida, host->index);
> +               kfree(host);
>                 return NULL;
>         }
>
> --
> 2.11.0
>
>

      reply	other threads:[~2017-01-30 11:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <dfed7598-7c82-c7d4-1f0b-3c5548adb377@gmail.com>
2017-01-28  8:32 ` [PATCH 2/2] mmc: core: fix error path in mmc_host_alloc Heiner Kallweit
2017-01-30 10:05   ` 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=CAPDyKFrkj-OZtFr_fxJvFzwB73ugYX8Qz96rt15H5mFuEhnv_A@mail.gmail.com \
    --to=ulf.hansson@linaro.org \
    --cc=hkallweit1@gmail.com \
    --cc=linux-mmc@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.