* [PATCH] ARM: tegra: fix ignored return value of regulator_enable
@ 2013-03-07 0:16 Stephen Warren
2013-03-07 20:31 ` Stephen Warren
0 siblings, 1 reply; 2+ messages in thread
From: Stephen Warren @ 2013-03-07 0:16 UTC (permalink / raw)
To: linux-arm-kernel
From: Stephen Warren <swarren@nvidia.com>
This fixes:
arch/arm/mach-tegra/board-harmony-pcie.c: In function ?harmony_pcie_init?:
arch/arm/mach-tegra/board-harmony-pcie.c:65:18: warning: ignoring return
value of ?regulator_enable?, declared with attribute
warn_unused_result [-Wunused-result]
Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
arch/arm/mach-tegra/board-harmony-pcie.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-tegra/board-harmony-pcie.c b/arch/arm/mach-tegra/board-harmony-pcie.c
index 3cdc1bb..d195db0 100644
--- a/arch/arm/mach-tegra/board-harmony-pcie.c
+++ b/arch/arm/mach-tegra/board-harmony-pcie.c
@@ -62,7 +62,11 @@ int __init harmony_pcie_init(void)
goto err_reg;
}
- regulator_enable(regulator);
+ err = regulator_enable(regulator);
+ if (err) {
+ pr_err("%s: regulator_enable failed: %d\n", __func__, err);
+ goto err_en;
+ }
err = tegra_pcie_init(true, true);
if (err) {
@@ -74,6 +78,7 @@ int __init harmony_pcie_init(void)
err_pcie:
regulator_disable(regulator);
+err_en:
regulator_put(regulator);
err_reg:
gpio_free(en_vdd_1v05);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] ARM: tegra: fix ignored return value of regulator_enable
2013-03-07 0:16 [PATCH] ARM: tegra: fix ignored return value of regulator_enable Stephen Warren
@ 2013-03-07 20:31 ` Stephen Warren
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Warren @ 2013-03-07 20:31 UTC (permalink / raw)
To: linux-arm-kernel
On 03/06/2013 05:16 PM, Stephen Warren wrote:
> This fixes:
>
> arch/arm/mach-tegra/board-harmony-pcie.c: In function ?harmony_pcie_init?:
> arch/arm/mach-tegra/board-harmony-pcie.c:65:18: warning: ignoring return
> value of ?regulator_enable?, declared with attribute
> warn_unused_result [-Wunused-result]
I've applied this to Tegra's for-3.10/fixes branch.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-03-07 20:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-07 0:16 [PATCH] ARM: tegra: fix ignored return value of regulator_enable Stephen Warren
2013-03-07 20:31 ` Stephen Warren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).