regulator: qcom_saw: Fix testing wrong value
PATCH 1/2 regulator: qcom_saw: Fix testing wrong value
Signed-off-by Axel Lin <[email protected]>
--- drivers/regulator/qcom_saw-regulator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/regulator/qcom_saw-regulator.c +2 -2
@@ -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);
Signature · 1 line
2.1.4
PATCH 2/2 regulator: qcom_saw: Fix uninitialized variable build warning
Fix below build warning:
CC [M] drivers/regulator/qcom_saw-regulator.odrivers/regulator/qcom_saw-regulator.c: In function 'qcom_saw_regulator_probe':drivers/regulator/qcom_saw-regulator.c:154:5: warning: 'found' is used uninitialized in this function [-Wuninitialized] drivers/regulator/qcom_saw-regulator.c:140:7: note: 'found' was declared here
Signed-off-by Axel Lin <[email protected]>
--- drivers/regulator/qcom_saw-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/regulator/qcom_saw-regulator.c +1 -1
@@ -137,7 +137,7 @@ static struct saw_vreg *saw_get_drv(struct platform_device *pdev,struct saw_vreg *vreg =NULL ;struct device_node *cpu_node, *saw_node;int cpu; -bool found; +bool found = false;for_each_possible_cpu (cpu) { cpu_node =of_cpu_device_node_get (cpu);
Signature · 1 line
2.1.4
Mark Brown
maintainerQuoted 1 line · Axel Lin
Signed-off-by Axel Lin <[email protected]>
I'm going to drop this driver so these patches are no longer required.