From 5175b0f4f57ed86136a89aac8e45ae56f68d9b92 Mon Sep 17 00:00:00 2001 From: Venkat Gopalakrishnan Date: Thu, 10 Sep 2015 12:25:27 -0700 Subject: [PATCH] mmc: sdhci-msm: return correct error code if emmc is not bootdevice Update the error code to ENODEV if eMMC is not the boot device. Change-Id: Ide0863a5aa64f9990d39095de6f6b13f752a6b3e Signed-off-by: Venkat Gopalakrishnan --- drivers/mmc/host/sdhci-msm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c index b961a3d9339c..0e8f99050d53 100644 --- a/drivers/mmc/host/sdhci-msm.c +++ b/drivers/mmc/host/sdhci-msm.c @@ -3229,8 +3229,10 @@ static int sdhci_msm_probe(struct platform_device *pdev) } /* skip the probe if eMMC isn't a boot device */ - if ((ret == 1) && !sdhci_msm_is_bootdevice(&pdev->dev)) + if ((ret == 1) && !sdhci_msm_is_bootdevice(&pdev->dev)) { + ret = -ENODEV; goto pltfm_free; + } if (disable_slots & (1 << (ret - 1))) { dev_info(&pdev->dev, "%s: Slot %d disabled\n", __func__,