Skip to contentSkip to conversation

regulator: qcom-saw: testing the wrong variable

PATCH New Dan Carpenter 1 participant 1 message Feb 12, 2016

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

PATCH 1/1 regulator: qcom-saw: testing the wrong variable

We accidentally test "config.regmap" which is zero instead of "vreg->regmap".

Fixes 18bba3b50355 ('regulator: qcom-saw: Add support for SAW regulators')
drivers/regulator/qcom_saw-regulator.c +2 -2
index c800f16..c00f0df 100644
@@ -186,8 +186,8 @@ static int qcom_saw_regulator_probe(struct platform_device *pdev)
 
 	vreg->regmap = syscon_node_to_regmap(saw_np);
 	of_node_put(saw_np);
-	if (IS_ERR(config.regmap))
-		return PTR_ERR(config.regmap);
+	if (IS_ERR(vreg->regmap))
+		return PTR_ERR(vreg->regmap);
 
 	snprintf(name, sizeof(name), "krait%d", cpu);