mtk-sd: reset host->mrq on prepare_data() error
Do not leave host with dangling ->mrq pointer if we hit
the msdc_prepare_data() error out path.
Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Reviewed-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Fixes: f5de469990 ("mtk-sd: Prevent memory corruption from DMA map failure")
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20250625052106.584905-1-senozhatsky@chromium.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
This commit is contained in:
committed by
Ulf Hansson
parent
dcc3bcfc5b
commit
ec54c0a207
@@ -1492,6 +1492,7 @@ static void msdc_ops_request(struct mmc_host *mmc, struct mmc_request *mrq)
|
||||
if (mrq->data) {
|
||||
msdc_prepare_data(host, mrq->data);
|
||||
if (!msdc_data_prepared(mrq->data)) {
|
||||
host->mrq = NULL;
|
||||
/*
|
||||
* Failed to prepare DMA area, fail fast before
|
||||
* starting any commands.
|
||||
|
||||
Reference in New Issue
Block a user