mmc: usdhi6rol0: handle NULL data in timeout
authorRabin Vincent <rabin.vincent@axis.com>
Fri, 27 Nov 2015 11:59:11 +0000 (12:59 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Mar 2016 23:07:15 +0000 (15:07 -0800)
commit84bad9db0d8cfa0d84ab988c40226413cb34e2b3
tree3a94295b3723deeb0b538d5e737bf5a84dd3b923
parentc0cbcf2cb59c076f4ff6422153534dd2762c3d44
mmc: usdhi6rol0: handle NULL data in timeout

commit 05caee939f8d58d81e962071da85761e1e3a4c73 upstream.

Commit bb08a7d489bd ("mmc: usdhi6rol0: fix NULL pointer deref in debug
print") fixed one NULL pointer dereference but unfortunately introduced
another.  "data" may be NULL if this is a command timeout for a command
without any data, so we should only use it if we're actually waiting for
data.

Fixes: bb08a7d489bd ("mmc: usdhi6rol0: fix NULL pointer deref in debug print")
Signed-off-by: Rabin Vincent <rabin.vincent@axis.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mmc/host/usdhi6rol0.c