Re: [PATCH] mmc: host: dw_mmc: Fix possible null-pointer dereferences in dw_mci_runtime_resume()

2019-08-01 Thread Ulf Hansson
On Fri, 26 Jul 2019 at 16:23, Jia-Ju Bai wrote: > > In dw_mci_runtime_resume(), there is an if statement on line 3420 > to check whether host->slot is NULL: > if (host->slot && ...) > > When host->slot is NULL, it is used on line 3458: > if (host->slot->mmc->pm_flags & MMC_PM_KEEP_POWER)

[PATCH] mmc: host: dw_mmc: Fix possible null-pointer dereferences in dw_mci_runtime_resume()

2019-07-26 Thread Jia-Ju Bai
In dw_mci_runtime_resume(), there is an if statement on line 3420 to check whether host->slot is NULL: if (host->slot && ...) When host->slot is NULL, it is used on line 3458: if (host->slot->mmc->pm_flags & MMC_PM_KEEP_POWER) and on line 3462: dw_mci_setup_bus(host->slot, true);