Commit 164b50b3 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Ulf Hansson

mmc: block: Replace "goto retry" by a proper do / while loop

Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 8cb6ed17
...@@ -1164,21 +1164,19 @@ static int mmc_blk_issue_discard_rq(struct mmc_queue *mq, struct request *req) ...@@ -1164,21 +1164,19 @@ static int mmc_blk_issue_discard_rq(struct mmc_queue *mq, struct request *req)
arg = MMC_TRIM_ARG; arg = MMC_TRIM_ARG;
else else
arg = MMC_ERASE_ARG; arg = MMC_ERASE_ARG;
retry: do {
if (card->quirks & MMC_QUIRK_INAND_CMD38) { err = 0;
err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL, if (card->quirks & MMC_QUIRK_INAND_CMD38) {
INAND_CMD38_ARG_EXT_CSD, err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
arg == MMC_TRIM_ARG ? INAND_CMD38_ARG_EXT_CSD,
INAND_CMD38_ARG_TRIM : arg == MMC_TRIM_ARG ?
INAND_CMD38_ARG_ERASE, INAND_CMD38_ARG_TRIM :
0); INAND_CMD38_ARG_ERASE,
if (err) 0);
goto out; }
} if (!err)
err = mmc_erase(card, from, nr, arg); err = mmc_erase(card, from, nr, arg);
out: } while (err == -EIO && !mmc_blk_reset(md, card->host, type));
if (err == -EIO && !mmc_blk_reset(md, card->host, type))
goto retry;
if (!err) if (!err)
mmc_blk_reset_success(md, type); mmc_blk_reset_success(md, type);
fail: fail:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment