Skip to content
Commit fe79018a authored by Jan Glauber's avatar Jan Glauber Committed by Ulf Hansson
Browse files

mmc: cavium: Check pointer before de-reference



Add a pointer check to prevent this smatch warning:

drivers/mmc/host/cavium.c:803 cvm_mmc_request()
	error: we previously assumed 'cmd->data' could be null (see line 782)

This is a theoretical fix because MMC_CMD_ADTC seems to imply
that cmd->data is not null. Nevertheless checking cmd->data
before using it improves readability.

Signed-off-by: default avatarJan Glauber <jglauber@cavium.com>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent c34d1579
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment