On 28 January 2017 at 09:32, Heiner Kallweit <hkallweit1@xxxxxxxxx> wrote: > Properly reverse everything if mmc_gpio_alloc(host) fails. > > Signed-off-by: Heiner Kallweit <hkallweit1@xxxxxxxxx> 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 > > -- 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