[PATCH] RFT: mmc: block: restore NULL check when retrying

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When retrying to send a request, we used to have a NULL
check on the request we try to resend.

It was removed in commit
c659b878689c ("mmc: block: inline command abortions")
but maybe that was not such a good idea. Maybe it can
actually be NULL?

This might be causeing regressions in errorpath behaviour
seen in kernelci boot tests on the sunxi.

I'm not sure because this state machine has so many
entrances and exits that I can't wrap my head around it.

Cc: Maxime Ripard <maxime.ripard@xxxxxxxxxxxxxxxxxx>
Reported-by: Ulf Hansson <ulf.hansson@xxxxxxxxxx>
Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
---
 drivers/mmc/core/block.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c
index ede759dda395..6c8be1a80551 100644
--- a/drivers/mmc/core/block.c
+++ b/drivers/mmc/core/block.c
@@ -1606,6 +1606,9 @@ static void mmc_blk_rw_cmd_abort(struct mmc_card *card, struct request *req)
 static void mmc_blk_rw_start_new(struct mmc_queue *mq, struct mmc_card *card,
 				 struct request *req)
 {
+	if (!req)
+		return;
+
 	if (mmc_card_removed(card)) {
 		req->rq_flags |= RQF_QUIET;
 		blk_end_request_all(req, -EIO);
-- 
2.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux