Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1622965
| From | Jan Glauber <jglauber@cavium.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 1/2] mmc: cavium: Remove redundant pointer check |
| Date | 2017-04-13 14:20 +0200 |
| Message-ID | <tvLTc-2Sx-23@gated-at.bofh.it> (permalink) |
| References | <tvLTc-2Sx-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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> --- drivers/mmc/host/cavium.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/cavium.c b/drivers/mmc/host/cavium.c index d842b69..ddf902c 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)); -- 2.9.0.rc0.21.g7777322
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH 1/2] mmc: cavium: Remove redundant pointer check Jan Glauber <jglauber@cavium.com> - 2017-04-13 14:20 +0200
csiph-web