From: Dan Carpenter <dan.carpenter@oracle.com>
To: jglauber@cavium.com
Cc: linux-mmc@vger.kernel.org
Subject: [bug report] mmc: cavium: Add core MMC driver for Cavium SOCs
Date: Wed, 12 Apr 2017 22:54:47 +0300 [thread overview]
Message-ID: <20170412195447.GA9213@mwanda> (raw)
Hello Jan Glauber,
This is a semi-automatic email about new static checker warnings.
The patch 8047c753f3d3: "mmc: cavium: Add core MMC driver for Cavium
SOCs" from Mar 30, 2017, leads to the following Smatch complaint:
drivers/mmc/host/cavium.c:694 cvm_mmc_dma_request()
warn: variable dereferenced before check 'mmc->card' (see line 675)
drivers/mmc/host/cavium.c
674
675 emm_dma = prepare_ext_dma(mmc, mrq);
^^^
Dereferenced inside this function call.
676 addr = prepare_dma(host, data);
677 if (!addr) {
678 dev_err(host->dev, "prepare_dma failed\n");
679 goto error;
680 }
681
682 host->dma_active = true;
683 host->int_enable(host, MIO_EMM_INT_CMD_ERR | MIO_EMM_INT_DMA_DONE |
684 MIO_EMM_INT_DMA_ERR);
685
686 if (host->dmar_fixup)
687 host->dmar_fixup(host, mrq->cmd, data, addr);
688
689 /*
690 * If we have a valid SD card in the slot, we set the response
691 * bit mask to check for CRC errors and timeouts only.
692 * Otherwise, use the default power reset value.
693 */
694 if (mmc->card && mmc_card_sd(mmc->card))
^^^^^^^^^
Checked too late.
695 writeq(0x00b00000ull, host->base + MIO_EMM_STS_MASK(host));
696 else
regards,
dan carpenter
next reply other threads:[~2017-04-12 19:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-12 19:54 Dan Carpenter [this message]
2017-04-12 20:31 [bug report] mmc: cavium: Add core MMC driver for Cavium SOCs Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170412195447.GA9213@mwanda \
--to=dan.carpenter@oracle.com \
--cc=jglauber@cavium.com \
--cc=linux-mmc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.