mmc: cavium: Remove redundant pointer check
authorJan Glauber <jglauber@cavium.com>
Thu, 13 Apr 2017 12:10:50 +0000 (14:10 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 24 Apr 2017 19:42:22 +0000 (21:42 +0200)
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>
drivers/mmc/host/cavium.c

index d842b69861896cef54b339a625a39eb5d2f7454d..ddf902c7f7e3c848166d8f7673686f52e1015913 100644 (file)
@@ -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));