From 9aac0330f0fd77bfb796e3fd654d532bed0a913b Mon Sep 17 00:00:00 2001 From: Ram Prakash Gupta Date: Thu, 13 Jan 2022 13:12:36 +0530 Subject: [PATCH] mmc: sdhci-msm: Fix slot indexing in driver Fix slot indexing in driver for mmc and sdcard per new indexing in dt. Change-Id: Ie960cd9c1a616c1a9d98aa862a3944515d184628 Signed-off-by: Ram Prakash Gupta Signed-off-by: Sarthak Garg --- drivers/mmc/host/sdhci-msm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c index 0fa4e191b7a7..263b56c5126a 100644 --- a/drivers/mmc/host/sdhci-msm.c +++ b/drivers/mmc/host/sdhci-msm.c @@ -4301,10 +4301,10 @@ static int sdhci_msm_probe(struct platform_device *pdev) if (pdev->dev.of_node) { ret = of_alias_get_id(pdev->dev.of_node, "sdhc"); - if (ret <= 0) + if (ret < 0) dev_err(&pdev->dev, "get slot index failed %d\n", ret); - else if (ret <= 2) - sdhci_slot[ret-1] = msm_host; + else if (ret <= 1) + sdhci_slot[ret] = msm_host; } /*