Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7a81902f authored by Seungwon Jeon's avatar Seungwon Jeon Committed by Chris Ball
Browse files

mmc: block: don't start new request when the card is removed



It's not necessary to start a new request while error handling if
the card was removed.

Signed-off-by: default avatarSeungwon Jeon <tgih.jun@samsung.com>
Acked-by: default avatarJaehoon Chung <jh80.chung@samsung.com>
Tested-by: default avatarKonstantin Dorfman <kdorfman@codeaurora.org>
Signed-off-by: default avatarChris Ball <cjb@laptop.org>
parent 9b844961
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -1456,8 +1456,14 @@ static int mmc_blk_issue_rw_rq(struct mmc_queue *mq, struct request *rqc)

 start_new_req:
	if (rqc) {
		if (mmc_card_removed(card)) {
			rqc->cmd_flags |= REQ_QUIET;
			blk_end_request_all(rqc, -EIO);
		} else {
			mmc_blk_rw_rq_prep(mq->mqrq_cur, card, 0, mq);
		mmc_start_req(card->host, &mq->mqrq_cur->mmc_active, NULL);
			mmc_start_req(card->host,
				      &mq->mqrq_cur->mmc_active, NULL);
		}
	}

	return 0;