From: Pierre Ossman Date: Mon, 5 Dec 2005 10:00:50 +0000 (+0000) Subject: [MMC] Proper check of SCR error code X-Git-Tag: v2.6.15-rc6~104^2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e781de44153885d5f772731726b4c0c16f8af021;p=linux-2.6 [MMC] Proper check of SCR error code The routine reading the SCR wasn't paying proper attention to the error codes returned from the driver. Signed-off-by: Pierre Ossman Signed-off-by: Russell King --- diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index d336a1d65d..b586a83a9b 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -932,8 +932,9 @@ static void mmc_read_scrs(struct mmc_host *host) sg_init_one(&sg, (u8*)card->raw_scr, 8); - err = mmc_wait_for_req(host, &mrq); - if (err != MMC_ERR_NONE) { + mmc_wait_for_req(host, &mrq); + + if (cmd.error != MMC_ERR_NONE || data.error != MMC_ERR_NONE) { mmc_card_set_dead(card); continue; }