From: Fabio Estevam <fabio.estevam@freescale.com>
To: <gregkh@linuxfoundation.org>
Cc: <kernel@pengutronix.de>, <shawn.guo@linaro.org>,
<linux-kernel@vger.kernel.org>,
Fabio Estevam <fabio.estevam@freescale.com>
Subject: [PATCH v2 1/3] imx-drm: imx-tve: Check the return value of 'regulator_enable()'
Date: Tue, 21 May 2013 11:24:44 -0300 [thread overview]
Message-ID: <1369146286-24434-1-git-send-email-fabio.estevam@freescale.com> (raw)
Since commit c8801a8 (regulator: core: Mark all get and enable calls as
__must_check) we need to check the value returned by 'regulator_enable()'.
Do this check to get rid of the following build warning:
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@freescale.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
---
Changes since v1:
- Use 'build warning' instead of 'build error' in commit log
- Also mention the commit that requires the checking
- Added Ack's
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
next reply other threads:[~2013-05-21 14:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-21 14:24 Fabio Estevam [this message]
2013-05-21 14:24 ` [PATCH v2 2/3] imx-drm: imx-tve: Let device core handle pinctrl Fabio Estevam
2013-05-21 14:24 ` [PATCH v2 3/3] imx-drm: parallel-display: " Fabio Estevam
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1369146286-24434-1-git-send-email-fabio.estevam@freescale.com \
--to=fabio.estevam@freescale.com \
--cc=gregkh@linuxfoundation.org \
--cc=kernel@pengutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=shawn.guo@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®