[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130521023945.GB3080@S2101-09.ap.freescale.net>
Date: Tue, 21 May 2013 10:39:47 +0800
From: Shawn Guo <shawn.guo@...aro.org>
To: Fabio Estevam <fabio.estevam@...escale.com>
CC: <gregkh@...uxfoundation.org>, <kernel@...gutronix.de>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/3] imx-drm: imx-tve: Check the return value of
'regulator_enable()'
On Mon, May 20, 2013 at 10:55:49AM -0300, Fabio Estevam wrote:
> Check the return value of 'regulator_enable()' to fix the following build error:
>
s/error/warning
It may be helpful to mention that the warning shows up since commit
c8801a8 (regulator: core: Mark all get and enable calls as
__must_check).
Other than these,
Acked-by: Shawn Guo <shawn.guo@...aro.org>
> drivers/staging/imx-drm/imx-tve.c: In function 'imx_tve_probe':
> drivers/staging/imx-drm/imx-tve.c:671:19: warning: ignoring return value of 'regulator_enable', declared with attribute warn_unused_result [-Wunused-result]
>
> Signed-off-by: Fabio Estevam <fabio.estevam@...escale.com>
> ---
> drivers/staging/imx-drm/imx-tve.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/staging/imx-drm/imx-tve.c b/drivers/staging/imx-drm/imx-tve.c
> index a6efa8f6..ce65ad3 100644
> --- a/drivers/staging/imx-drm/imx-tve.c
> +++ b/drivers/staging/imx-drm/imx-tve.c
> @@ -668,7 +668,9 @@ static int imx_tve_probe(struct platform_device *pdev)
> tve->dac_reg = devm_regulator_get(&pdev->dev, "dac");
> if (!IS_ERR(tve->dac_reg)) {
> regulator_set_voltage(tve->dac_reg, 2750000, 2750000);
> - regulator_enable(tve->dac_reg);
> + ret = regulator_enable(tve->dac_reg);
> + if (ret)
> + return ret;
> }
>
> tve->clk = devm_clk_get(&pdev->dev, "tve");
> --
> 1.8.1.2
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists