mmc: toshsd: move dereference below check for NULL
authorDan Carpenter <dan.carpenter@oracle.com>
Sat, 15 Nov 2014 18:56:41 +0000 (21:56 +0300)
committerUlf Hansson <ulf.hansson@linaro.org>
Wed, 26 Nov 2014 13:31:01 +0000 (14:31 +0100)
commit9e2a0c96efab30c85367176d1fc2c04906676458
treedf21a221d9b5a7b42cc3142d33ae0e177bc0c337
parentecb89f2f5f3e771108a5595b0b4d1a1a974cc926
mmc: toshsd: move dereference below check for NULL

We check for NULL pointers after dereferencing so it's too late.  Oddly
enough, Smatch misses this code but complains about the caller passing
NULL pointers to this function:

drivers/mmc/host/toshsd.c:389 toshsd_irq()
error: we previously assumed 'host->cmd' could be null (see line 349)

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/toshsd.c