mmc: bcm2835: fix potential null pointer dereferences
authorGustavo A. R. Silva <garsilva@embeddedor.com>
Thu, 25 May 2017 17:04:55 +0000 (12:04 -0500)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 20 Jun 2017 08:30:31 +0000 (10:30 +0200)
commitc00a231ba053a9b0be8d512957b99395b92bc620
tree382a140ff1e4cc16ead5a76c1ef9bdc510f46831
parentd63c2bf49c0de83e88153da3af9970f68c633257
mmc: bcm2835: fix potential null pointer dereferences

Null check at line 1165: if (mrq->cmd), implies that mrq->cmd might
be NULL.
Add null checks before dereferencing pointer mrq->cmd in order to avoid
any potential NULL pointer dereference.

Addresses-Coverity-ID: 1408740
Tested-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/bcm2835.c