diff options
author | Shawn Lin <shawn.lin@rock-chips.com> | 2017-07-06 11:09:12 +0300 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2017-08-30 15:01:28 +0300 |
commit | 09954ea9b6d4390555b71b30c5c3b82b6c679cf3 (patch) | |
tree | f985caf52092053278f8908c1797e2724fd6049e /drivers/mmc/host/mxcmmc.c | |
parent | e5d0e17bb6022d8c10f7f7a193acee481c53393a (diff) | |
download | linux-09954ea9b6d4390555b71b30c5c3b82b6c679cf3.tar.xz |
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: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host/mxcmmc.c')
-rw-r--r-- | drivers/mmc/host/mxcmmc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mmc/host/mxcmmc.c b/drivers/mmc/host/mxcmmc.c index f3c28326c4db..f2b6639634d2 100644 --- a/drivers/mmc/host/mxcmmc.c +++ b/drivers/mmc/host/mxcmmc.c @@ -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; |