diff mbox

mmc: tmio: fix compiler warning

Message ID Pine.LNX.4.64.1307081135170.19819@axis700.grange (mailing list archive)
State New, archived
Headers show

Commit Message

Guennadi Liakhovetski July 8, 2013, 9:38 a.m. UTC
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>
---

This warning is present in "next" and in 3.10, but since it doesn't affect 
functionality, I don't think it's needed for stable.

 drivers/mmc/host/tmio_mmc_pio.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

Comments

Olof Johansson July 23, 2013, 7:01 p.m. UTC | #1
On Mon, Jul 8, 2013 at 2:38 AM, Guennadi Liakhovetski
<g.liakhovetski@gmx.de> wrote:
> 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>

Acked-by: Olof Johansson <olof@lixom.net>

Chris, this warniong is staring at me from my inbox every morning.
Would you mind picking it up for 3.11?


Thanks!

-Olof
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Chris Ball July 23, 2013, 7:08 p.m. UTC | #2
Hi,

On Tue, Jul 23 2013, Olof Johansson wrote:
> On Mon, Jul 8, 2013 at 2:38 AM, Guennadi Liakhovetski
> <g.liakhovetski@gmx.de> wrote:
>> 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>
>
> Acked-by: Olof Johansson <olof@lixom.net>
>
> Chris, this warniong is staring at me from my inbox every morning.
> Would you mind picking it up for 3.11?

Sure -- pushed to mmc-next for 3.11.

Thanks,

- Chris.
diff mbox

Patch

diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c
index f294708..84e1888 100644
--- a/drivers/mmc/host/tmio_mmc_pio.c
+++ b/drivers/mmc/host/tmio_mmc_pio.c
@@ -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)