From: Arnd Bergmann <arnd@kernel.org>
To: Ulf Hansson <ulfh@kernel.org>, Linus Walleij <linusw@kernel.org>,
Arnd Bergmann <arnd@arndb.de>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>,
Wolfram Sang <wsa+renesas@sang-engineering.com>,
Frank Li <Frank.Li@nxp.com>, Runyu Xiao <runyu.xiao@seu.edu.cn>,
"Matthew Wilcox (Oracle)" <willy@infradead.org>,
Samarth Narang <samarth.colleges@gmail.com>,
Pan Chuang <panchuang@vivo.com>,
linux-mmc@vger.kernel.org
Subject: [PATCH 1/2] mmc: sh_mmcif: fix error handling
Date: Wed, 2 Dec 2026 16:23:48 +0100 [thread overview]
Message-ID: <20261202152437.664948-1-arnd@kernel.org> (raw)
From: Arnd Bergmann <arnd@arndb.de>
My earlier patch introduced a bug in the error handling code,
as Sashiko-bot reported.
Fix this by only resetting the number of bytes transferred
if a request has a 'data' member.
Cc: Linus Walleij <linusw@kernel.org>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>
Fixes: d372d206e6e0 ("mmc: sh_mmcif: rework sg_miter handling")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
If possible, please fold this into the earlier patch, otherwise
this can go on top.
---
drivers/mmc/host/sh_mmcif.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c
index c6033c6596e0..9850d2ae6f16 100644
--- a/drivers/mmc/host/sh_mmcif.c
+++ b/drivers/mmc/host/sh_mmcif.c
@@ -1388,7 +1388,8 @@ static void sh_mmcif_timeout_work(struct work_struct *work)
BUG();
}
- mrq->data->bytes_xfered = 0;
+ if (mrq->data)
+ mrq->data->bytes_xfered = 0;
host->state = STATE_IDLE;
host->wait_for = MMCIF_WAIT_FOR_REQUEST;
host->mrq = NULL;
--
2.53.0
next reply other threads:[~2026-12-02 15:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-02 15:23 Arnd Bergmann [this message]
2026-12-02 15:23 ` [PATCH 2/2] mmc: convert sg_miter user to SG_MITER_LOCAL Arnd Bergmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261202152437.664948-1-arnd@kernel.org \
--to=arnd@kernel.org \
--cc=Frank.Li@nxp.com \
--cc=arnd@arndb.de \
--cc=geert+renesas@glider.be \
--cc=linusw@kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=panchuang@vivo.com \
--cc=runyu.xiao@seu.edu.cn \
--cc=samarth.colleges@gmail.com \
--cc=ulfh@kernel.org \
--cc=willy@infradead.org \
--cc=wsa+renesas@sang-engineering.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox