mmc: dw_mmc: Fix potential null pointer risk
authorWen Zhiwei <wenzhiwei@kylinos.cn>
Wed, 29 Dec 2021 02:38:14 +0000 (10:38 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 14 Feb 2022 13:55:00 +0000 (14:55 +0100)
commit610c07913de39428bb623c08db1c1d83e8a73bfe
treef046b8bbdbe794eabcce7121ffcdd726625bf6a6
parent754e0b0e35608ed5206d6a67a791563c631cec07
mmc: dw_mmc: Fix potential null pointer risk

we previously assumed 'host->slot' could be null,
null pointer judgment should be added

Signed-off-by: Wen Zhiwei <wenzhiwei@kylinos.cn>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Link: https://lore.kernel.org/r/20211229023814.53372-1-wenzhiwei@kylinos.cn
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/dw_mmc.c