]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Nov 2016 15:38:53 +0000 (16:38 +0100)
commitb80fcd58e6f6ab1a68a6d251fb8bba67e03df8ae
tree8f494fdef49e5f728d2b7e39ec435c6db2bcd3be
parent1244d3c3a0f6f5bcfbf6364f2e75b7e4dfda9d82
mmc: dw_mmc-pltfm: fix the potential NULL pointer dereference

commit 45c7a4908a307a023e237a64a3eadcafc4836493 upstream.

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>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mmc/host/dw_mmc-pltfm.c