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

Commit 09954ea9 authored by Shawn Lin's avatar Shawn Lin Committed by Ulf Hansson
Browse files

mmc: mxcmmc: check the return value of mxcmci_finish_data



We got a compile warning for mxcmmc,

drivers/mmc/host/mxcmmc.c: In function 'mxcmci_data_done':
drivers/mmc/host/mxcmmc.c:661:6: warning: variable 'data_error' set but
not used [-Wunused-but-set-variable]

The easiest method is to remove the data_error. But looking into
the code closely, I think we should check the return value of
mxcmci_finish_data as if it got data->error(the same as data_error),
we shouldn't try to read the response.

Signed-off-by: default avatarShawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent e5d0e17b
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -681,6 +681,9 @@ static void mxcmci_data_done(struct mxcmci_host *host, unsigned int stat)

	spin_unlock_irqrestore(&host->lock, flags);

	if (data_error)
		return;

	mxcmci_read_response(host, stat);
	host->cmd = NULL;