linux-stable/drivers/mmc
Javier Martinez Canillas 636efbc664 mmc: pwrseq: Fix error code propagation in mmc_pwrseq_simple_alloc()
If the struct mmc_pwrseq_match .alloc function used to allocate a
struct mmc_pwrseq fails, the error is propagated to mmc_of_parse().

But instead of returning the error code in pwrseq, host->pwrseq is
returned which will always be 0. So mmc_of_parse() succeeds even if
the pwrseq .alloc function failed and host->pwrseq is NULL.

This makes the SDIO device to not be powered if the power sequencing
.alloc functions wants to be deferred due a missing resource because
the mmc controller driver probe did wrongly succeed.

Fixes: 0f12a0ce4c ("mmc: pwrseq: simplify alloc/free hooks")
Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2015-04-17 10:17:19 +02:00
..
card sd, mmc, virtio_blk, string_helpers: fix block size units 2015-04-10 16:27:48 -07:00
core mmc: pwrseq: Fix error code propagation in mmc_pwrseq_simple_alloc() 2015-04-17 10:17:19 +02:00
host powerpc updates for 4.1 2015-04-16 13:53:32 -05:00
Kconfig
Makefile mmc: sdhci-pci: add platform data 2012-01-11 23:58:47 -05:00