summaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorJan Glauber <jglauber@cavium.com>2017-04-13 14:10:50 +0200
committerUlf Hansson <ulf.hansson@linaro.org>2017-04-24 21:42:22 +0200
commitc34d1579de4665d9613691bc37aebb7ca86d535d (patch)
tree72d3d0dad69a10fb40c463eaa4a434e779473779 /drivers/mmc
parent79ed05e329c34c68ab2a87f729e666fcf208fdad (diff)
downloadlinux-c34d1579de4665d9613691bc37aebb7ca86d535d.tar.bz2
mmc: cavium: Remove redundant pointer check
Remove redundant mmc->card check reported by smatch: drivers/mmc/host/cavium.c:694 cvm_mmc_dma_request() warn: variable dereferenced before check 'mmc->card' (see line 675) Signed-off-by: Jan Glauber <jglauber@cavium.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/cavium.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/host/cavium.c b/drivers/mmc/host/cavium.c
index d842b6986189..ddf902c7f7e3 100644
--- a/drivers/mmc/host/cavium.c
+++ b/drivers/mmc/host/cavium.c
@@ -691,7 +691,7 @@ static void cvm_mmc_dma_request(struct mmc_host *mmc,
* bit mask to check for CRC errors and timeouts only.
* Otherwise, use the default power reset value.
*/
- if (mmc->card && mmc_card_sd(mmc->card))
+ if (mmc_card_sd(mmc->card))
writeq(0x00b00000ull, host->base + MIO_EMM_STS_MASK(host));
else
writeq(0xe4390080ull, host->base + MIO_EMM_STS_MASK(host));