sdhci: tegra: Don't use WARN_ON in error cases
Pavan Kunapuli [Wed, 2 Nov 2011 11:53:46 +0000 (16:53 +0530)]
Do not use WARN_ON when regulators are not found
as it would print the stack dump while booting. Use
dev_err to print the error message.

Change-Id: Ibe22cfe8d24719c2352084d7043f47d5203b84d0
Reviewed-on: http://git-master/r/61862
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

Rebase-Id: R5f7ab8071b742843d960ce8b315e8095374af1b5

drivers/mmc/host/sdhci-tegra.c

index e9995a1..b1c4cb3 100644 (file)
@@ -462,7 +462,7 @@ static int __devinit sdhci_tegra_probe(struct platform_device *pdev)
 
        if (!plat->mmc_data.built_in) {
                tegra_host->vdd_io_reg = regulator_get(mmc_dev(host->mmc), "vddio_sdmmc");
-               if (WARN_ON(IS_ERR_OR_NULL(tegra_host->vdd_io_reg))) {
+               if (IS_ERR_OR_NULL(tegra_host->vdd_io_reg)) {
                        dev_err(mmc_dev(host->mmc), "%s regulator not found: %ld\n",
                                "vddio_sdmmc", PTR_ERR(tegra_host->vdd_io_reg));
                        tegra_host->vdd_io_reg = NULL;
@@ -478,7 +478,7 @@ static int __devinit sdhci_tegra_probe(struct platform_device *pdev)
                }
 
                tegra_host->vdd_slot_reg = regulator_get(mmc_dev(host->mmc), "vddio_sd_slot");
-               if (WARN_ON(IS_ERR_OR_NULL(tegra_host->vdd_slot_reg))) {
+               if (IS_ERR_OR_NULL(tegra_host->vdd_slot_reg)) {
                        dev_err(mmc_dev(host->mmc), "%s regulator not found: %ld\n",
                                "vddio_sd_slot", PTR_ERR(tegra_host->vdd_slot_reg));
                        tegra_host->vdd_slot_reg = NULL;