Skip to content

Commit

Permalink
mmc: cavium: Remove redundant pointer check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jan Glauber authored and Ulf Hansson committed Apr 24, 2017
1 parent 79ed05e commit c34d157
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mmc/host/cavium.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit c34d157

Please sign in to comment.