From: Ohad Ben-Cohen Date: Sun, 14 Nov 2010 10:40:33 +0000 (+0200) Subject: mmc: sdio: fix nasty oops in mmc_sdio_detect X-Git-Tag: v2.6.37-rc4~24^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4d0812c37f2f6cf6fc7ca086b5a5e572cbbe7f6d;p=pandora-kernel.git mmc: sdio: fix nasty oops in mmc_sdio_detect Power off the card in mmc_sdio_detect __before__ a potential error handler, which completely removes the card, executes, and only if the card was successfully powered on beforehand. While we're at it, use the _sync variant of the runtime PM put API, in order to ensure that the card is left powered off in case an error occurred, and the card is going to be removed. Reproduced and tested on the OLPC XO-1.5. Reported-by: Daniel Drake Signed-off-by: Ohad Ben-Cohen Signed-off-by: Chris Ball --- Reading git-diff-tree failed