Sfoglia il codice sorgente

[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 <drzeus@drzeus.cx>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Pierre Ossman 19 anni fa
parent
commit
e781de4415
1 ha cambiato i file con 3 aggiunte e 2 eliminazioni
  1. 3 2
      drivers/mmc/mmc.c

+ 3 - 2
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);
 		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);
 			mmc_card_set_dead(card);
 			continue;
 			continue;
 		}
 		}