mmc: tmio: fix compiler warning
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Mon, 8 Jul 2013 09:38:09 +0000 (11:38 +0200)
committerChris Ball <cjb@laptop.org>
Tue, 23 Jul 2013 19:06:47 +0000 (15:06 -0400)
This patch fixes a compiler warning:

drivers/mmc/host/tmio_mmc_pio.c: In function 'tmio_mmc_power_on':
drivers/mmc/host/tmio_mmc_pio.c:798:19: warning: ignoring return value of
'regulator_enable', declared with attribute warn_unused_result [-Wunused-result]

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/host/tmio_mmc_pio.c

index b72edb7..718843c 100644 (file)
@@ -795,9 +795,13 @@ static void tmio_mmc_power_on(struct tmio_mmc_host *host, unsigned short vdd)
         * omap_hsmmc.c driver does.
         */
        if (!IS_ERR(mmc->supply.vqmmc) && !ret) {
-               regulator_enable(mmc->supply.vqmmc);
+               ret = regulator_enable(mmc->supply.vqmmc);
                udelay(200);
        }
+
+       if (ret < 0)
+               dev_dbg(&host->pdev->dev, "Regulators failed to power up: %d\n",
+                       ret);
 }
 
 static void tmio_mmc_power_off(struct tmio_mmc_host *host)