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.4.104~13 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5c65b739389fbc353fb42d379e9b7379cfe6d3f6;p=thirdparty%2Fkernel%2Fstable.git mmc: core: Do not leave the block driver in a suspended state commit ebe7dd45cf49e3b49cacbaace17f9f878f21fbea upstream. The block driver must be resumed if the mmc bus fails to suspend the card. Signed-off-by: Adrian Hunter Reviewed-by: Linus Walleij Signed-off-by: Ulf Hansson Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c index 972ff844cf5a3..cf7c7bc1e940d 100644 --- a/drivers/mmc/core/bus.c +++ b/drivers/mmc/core/bus.c @@ -155,6 +155,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; }