Skip to contentSkip to conversation

ARM: tegra: fix ignored return value of regulator_enable

PATCH New Stephen Warren 1 participant 2 messages Mar 7, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: tegra: fix ignored return value of regulator_enable

From: Stephen Warren <[email protected]>

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]

---
 arch/arm/mach-tegra/board-harmony-pcie.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
arch/arm/mach-tegra/board-harmony-pcie.c +6 -1
index 3cdc1bb..d195db0 100644
@@ -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);
Signature · 1 line
1.7.10.4
author Applied
#1 lore raw

PATCH 1/1 ARM: tegra: fix ignored return value of regulator_enable

Quoted 6 lines · Stephen Warren

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.