[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20160212063940.GC22756@mwanda>
Date: Fri, 12 Feb 2016 09:39:40 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Liam Girdwood <lgirdwood@...il.com>,
Georgi Djakov <georgi.djakov@...aro.org>
Cc: Mark Brown <broonie@...nel.org>, linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org
Subject: [patch] 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')
Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
diff --git a/drivers/regulator/qcom_saw-regulator.c b/drivers/regulator/qcom_saw-regulator.c
index c800f16..c00f0df 100644
--- a/drivers/regulator/qcom_saw-regulator.c
+++ b/drivers/regulator/qcom_saw-regulator.c
@@ -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);
Powered by blists - more mailing lists