mmc: dw_mmc-pltfm: fix the potential NULL pointer dereference
authorJaehoon Chung <jh80.chung@samsung.com>
Fri, 21 Oct 2016 10:57:57 +0000 (19:57 +0900)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 25 Oct 2016 08:39:40 +0000 (10:39 +0200)
commit45c7a4908a307a023e237a64a3eadcafc4836493
tree5b2d7e769f68865a6531fc2455ebf33345f25f01
parent07d9a380680d1c0eb51ef87ff2eab5c994949e69
mmc: dw_mmc-pltfm: fix the potential NULL pointer dereference

platform_get_resource can be returned the NULL pointer.
Then regs->start should be referred to NULL Pointer.
devm_ioremap_resource() checks whether res is NULL or not.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com>
Cc: stable@vger.kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/dw_mmc-pltfm.c