]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.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)
committerLuis Henriques <luis.henriques@canonical.com>
Tue, 6 Dec 2016 16:51:57 +0000 (16:51 +0000)
commit022426815cbb50720977b746a95cc816e98d9150
tree1c6a0a1d1e408ae765f1df276905191742380a77
parenta6b4f75ace925daeb2fca30b90bbb1fe01cb50ed
mmc: dw_mmc-pltfm: fix the potential NULL pointer dereference

BugLink: http://bugs.launchpad.net/bugs/1642572
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>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
drivers/mmc/host/dw_mmc-pltfm.c