Skip to content

Commit

Permalink
[MMC] Proper check of SCR error code
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Pierre Ossman authored and Russell King committed Dec 5, 2005
1 parent e4f5c82 commit e781de4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/mmc/mmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit e781de4

Please sign in to comment.