public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: vipin.bhandari@ti.com
Cc: linux-mmc@vger.kernel.org
Subject: re: DaVinci: MMC: MMC/SD controller driver for DaVinci family
Date: Wed, 6 Nov 2013 19:15:03 +0300	[thread overview]
Message-ID: <20131106161503.GG15603@elgon.mountain> (raw)

Hello Vipin Bhandari,

This is a semi-automatic email about new static checker warnings.

The patch b4cff4549b7a: "DaVinci: MMC: MMC/SD controller driver for 
DaVinci family" from Dec 14, 2009, leads to the following Smatch 
complaint:

drivers/mmc/host/davinci_mmc.c:984 mmc_davinci_irq()
	 error: we previously assumed 'data' could be null (see line 967)

drivers/mmc/host/davinci_mmc.c
   966			/* All blocks sent/received, and CRC checks passed */
   967			if (data != NULL) {
                            ^^^^^^^^^^^^
Check.

   968				if ((host->do_dma == 0) && (host->bytes_left > 0)) {
   969					/* if datasize < rw_threshold
   970					 * no RX ints are generated
   971					 */
   972					davinci_fifo_data_trans(host, host->bytes_left);
   973				}
   974				end_transfer = 1;
   975				data->bytes_xfered = data->blocks * data->blksz;
   976			} else {
   977				dev_err(mmc_dev(host->mmc),
   978						"DATDNE with no host->data\n");
   979			}
   980		}
   981	
   982		if (qstatus & MMCST0_TOUTRD) {
   983			/* Read data timeout */
   984			data->error = -ETIMEDOUT;
                        ^^^^^^^^^^^^^^^^^^^^^^^^
Unchecked dereference.

   985			end_transfer = 1;
   986	

regards,
dan carpenter

                 reply	other threads:[~2013-11-06 16:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20131106161503.GG15603@elgon.mountain \
    --to=dan.carpenter@oracle.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=vipin.bhandari@ti.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox