Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e5a61353 authored by Jaehoon Chung's avatar Jaehoon Chung Committed by Ulf Hansson
Browse files

mmc: dw_mmc: exynos: fix the NULL pointer dereference error



"host->cur_slot" should be assigned to start the request.
So it can be the NULL pointer. This patch fixed this error.

Signed-off-by: default avatarJaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 65257a0d
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -157,7 +157,7 @@ static void dw_mci_exynos_set_clksel_timing(struct dw_mci *host, u32 timing)
	 * HOLD register should be bypassed in case there is no phase shift
	 * HOLD register should be bypassed in case there is no phase shift
	 * applied on CMD/DATA that is sent to the card.
	 * applied on CMD/DATA that is sent to the card.
	 */
	 */
	if (!SDMMC_CLKSEL_GET_DRV_WD3(clksel))
	if (!SDMMC_CLKSEL_GET_DRV_WD3(clksel) && host->cur_slot)
		set_bit(DW_MMC_CARD_NO_USE_HOLD, &host->cur_slot->flags);
		set_bit(DW_MMC_CARD_NO_USE_HOLD, &host->cur_slot->flags);
}
}