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, 28 Feb 2022 12:06:20 +0000 (13:06 +0100)
commit4a835afd808a3dbbac44bb399a902b822dc7445c
tree8e7979779051e1f2083e78116702dafb064a8072
parent7e57714cd0ad2d5bb90e50b5096a0e671dec1ef3
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