RE: mmc: dw_mmc: rework the code related to cmd/data completion

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

 



Hi Dan Carpenter,

On Thur, November 07, 2013, Dan Carpenter wrote:
> Hello Seungwon Jeon,
> 
> This is a semi-automatic email about new static checker warnings.
> 
> The patch e352c8131100: "mmc: dw_mmc: rework the code related to
> cmd/data completion" from Aug 31, 2013, leads to the following Smatch
> complaint:
> 
> drivers/mmc/host/dw_mmc.c:1339 dw_mci_tasklet_func()
> 	 error: we previously assumed 'data->stop' could be null (see line 1337)
> 
> drivers/mmc/host/dw_mmc.c
>   1336				if (!err) {
>   1337					if (!data->stop || mrq->sbc) {
>                                              ^^^^^^^^^^
> New check.
> 
>   1338						if (mrq->sbc)
>   1339							data->stop->error = 0;
>                                                         ^^^^^^^^^^
> New unchecked dereference.  Should the check be "if (data->stop)"
> instead of "if (mrq->sbc)"?
It assumes that Upper layer sets all together. Actually, it does.
If 'mrq->sbc' is valid, it means that 'data->stop' must be also valid.
But if '&& data->stop' condition is added , it would be certain.
Ok. Thank you for report.

Thanks,
Seungwon Jeon.

--
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