]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mmc: dw_mmc: fix multiple drv_data NULL dereferences
authorJames Hogan <james.hogan@imgtec.com>
Tue, 16 Oct 2012 08:43:08 +0000 (09:43 +0100)
committerChris Ball <cjb@laptop.org>
Mon, 29 Oct 2012 13:26:00 +0000 (09:26 -0400)
commite35ae7e22fd82cdb16f336cecd5c95780fa2359f
treeda2ed4d548a1dd06457e10286cfc2ab88042c987
parente1964422c21bc26b7a33e57d488f3c7b1a2bc982
mmc: dw_mmc: fix multiple drv_data NULL dereferences

800d78bfccb3d ("mmc: dw_mmc: add support for implementation specific
callbacks") -- merged in v3.7-rc1 -- introduced multiple NULL pointer
dereferences when the default dw_mci_pltfm_probe() is used, as it sets
host->drv_data to NULL, and that's only checked against NULL in 1 out of
the 7 cases where it is dereferenced.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
Acked-by: Will Newton <will.newton@imgtec.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/host/dw_mmc-pltfm.c
drivers/mmc/host/dw_mmc.c