From: Javier Martinez Canillas Date: Mon, 13 Apr 2015 14:07:41 +0000 (+0200) Subject: mmc: pwrseq: Fix error code propagation in mmc_pwrseq_simple_alloc() X-Git-Tag: omap-for-v4.2/o2_dc~46^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=636efbc66452659840a9a4df1daf80074ee439f6;p=pandora-kernel.git 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: 0f12a0ce4ce4a ("mmc: pwrseq: simplify alloc/free hooks") Signed-off-by: Javier Martinez Canillas Reviewed-by: Alexandre Courbot Signed-off-by: Ulf Hansson --- Reading git-diff-tree failed