mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 13:53:33 +00:00
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>
This commit is contained in:
parent
7e57714cd0
commit
4a835afd80
1 changed files with 1 additions and 1 deletions
|
@ -3568,7 +3568,7 @@ int dw_mci_runtime_resume(struct device *dev)
|
|||
mci_writel(host, CTRL, SDMMC_CTRL_INT_ENABLE);
|
||||
|
||||
|
||||
if (host->slot->mmc->pm_flags & MMC_PM_KEEP_POWER)
|
||||
if (host->slot && host->slot->mmc->pm_flags & MMC_PM_KEEP_POWER)
|
||||
dw_mci_set_ios(host->slot->mmc, &host->slot->mmc->ios);
|
||||
|
||||
/* Force setup bus to guarantee available clock output */
|
||||
|
|
Loading…
Reference in a new issue