re: DaVinci: MMC: MMC/SD controller driver for DaVinci family

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux