Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1331693 > unrolled thread

[PATCH 1/2] regulator: qcom_saw: Fix testing wrong value

Started byAxel Lin <axel.lin@ingics.com>
First post2016-02-11 06:00 +0100
Last post2016-02-20 18:40 +0100
Articles 3 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 1/2] regulator: qcom_saw: Fix testing wrong value Axel Lin <axel.lin@ingics.com> - 2016-02-11 06:00 +0100
    [PATCH 2/2] regulator: qcom_saw: Fix uninitialized variable build  warning Axel Lin <axel.lin@ingics.com> - 2016-02-11 06:00 +0100
    Re: [PATCH 1/2] regulator: qcom_saw: Fix testing wrong value Mark Brown <broonie@kernel.org> - 2016-02-20 18:40 +0100

#1331693 — [PATCH 1/2] regulator: qcom_saw: Fix testing wrong value

FromAxel Lin <axel.lin@ingics.com>
Date2016-02-11 06:00 +0100
Subject[PATCH 1/2] regulator: qcom_saw: Fix testing wrong value
Message-ID<r0Rwe-3Nq-15@gated-at.bofh.it>
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/regulator/qcom_saw-regulator.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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);
 
-- 
2.1.4

[toc] | [next] | [standalone]


#1331694 — [PATCH 2/2] regulator: qcom_saw: Fix uninitialized variable build warning

FromAxel Lin <axel.lin@ingics.com>
Date2016-02-11 06:00 +0100
Subject[PATCH 2/2] regulator: qcom_saw: Fix uninitialized variable build warning
Message-ID<r0Rwe-3Nq-19@gated-at.bofh.it>
In reply to#1331693
Fix below build warning:
  CC [M]  drivers/regulator/qcom_saw-regulator.o
drivers/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 <axel.lin@ingics.com>
---
 drivers/regulator/qcom_saw-regulator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/qcom_saw-regulator.c b/drivers/regulator/qcom_saw-regulator.c
index c00f0df..6751614 100644
--- a/drivers/regulator/qcom_saw-regulator.c
+++ b/drivers/regulator/qcom_saw-regulator.c
@@ -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);
-- 
2.1.4

[toc] | [prev] | [next] | [standalone]


#1338756

FromMark Brown <broonie@kernel.org>
Date2016-02-20 18:40 +0100
Message-ID<r4jFE-JJ-7@gated-at.bofh.it>
In reply to#1331693

[Multipart message — attachments visible in raw view] — view raw

On Thu, Feb 11, 2016 at 12:57:21PM +0800, Axel Lin wrote:
> Signed-off-by: Axel Lin <axel.lin@ingics.com>

I'm going to drop this driver so these patches are no longer required.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web