From: Adrian Hunter Date: Tue, 21 Nov 2017 13:42:29 +0000 (+0200) Subject: mmc: core: Do not leave the block driver in a suspended state X-Git-Tag: v4.15-rc2~10^2~5 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=ebe7dd45cf49e3b49cacbaace17f9f878f21fbea;p=users%2Fjedix%2Flinux-maple.git mmc: core: Do not leave the block driver in a suspended state The block driver must be resumed if the mmc bus fails to suspend the card. Signed-off-by: Adrian Hunter Reviewed-by: Linus Walleij Cc: stable@vger.kernel.org # v3.19+ Signed-off-by: Ulf Hansson --- diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c index a4b49e25fe963..7586ff2ad1f17 100644 --- a/drivers/mmc/core/bus.c +++ b/drivers/mmc/core/bus.c @@ -157,6 +157,9 @@ static int mmc_bus_suspend(struct device *dev) return ret; ret = host->bus_ops->suspend(host); + if (ret) + pm_generic_resume(dev); + return ret; }