All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] input: tm2-touchkey: fix odd_ptr_err.cocci warnings
@ 2017-01-03 13:39 ` Julia Lawall
  0 siblings, 0 replies; 3+ messages in thread
From: Julia Lawall @ 2017-01-03 13:39 UTC (permalink / raw)
  To: Jaechul Lee
  Cc: Dmitry Torokhov, Rob Herring, Mark Rutland, Catalin Marinas,
	Will Deacon, Kukjin Kim, Krzysztof Kozlowski,
	Javier Martinez Canillas, kbuild-all, Jaechul Lee, Andi Shyti,
	Chanwoo Choi, beomho.seo, galaxyra, linux-arm-kernel,
	linux-input, devicetree, linux-kernel, linux-samsung-soc

PTR_ERR should access the value just tested by IS_ERR

Generated by: scripts/coccinelle/tests/odd_ptr_err.cocci

CC: Jaechul Lee <jcsing.lee@samsung.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

I have only looked at the extract of code that is shown here.  It could be
the test that is wrong.

The code comes from:

url:
https://github.com/0day-ci/linux/commits/Jaechul-Lee/Add-touch-key-driver-su
pport-for-TM2/20170103-183357
:::::: branch date: 2 hours ago
:::::: commit date: 2 hours ago

 tm2-touchkey.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/input/keyboard/tm2-touchkey.c
+++ b/drivers/input/keyboard/tm2-touchkey.c
@@ -196,7 +196,7 @@ static int tm2_touchkey_probe(struct i2c
 				devm_regulator_get(&client->dev, "vdd");
 	if (IS_ERR(samsung_touchkey->regulator_vdd)) {
 		dev_err(&client->dev, "Failed to get vdd regulator\n");
-		return PTR_ERR(samsung_touchkey->regulator_vcc);
+		return PTR_ERR(samsung_touchkey->regulator_vdd);
 	}

 	/* power */

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] input: tm2-touchkey: fix odd_ptr_err.cocci warnings
@ 2017-01-03 13:39 ` Julia Lawall
  0 siblings, 0 replies; 3+ messages in thread
From: Julia Lawall @ 2017-01-03 13:39 UTC (permalink / raw)
  Cc: Dmitry Torokhov, Rob Herring, Mark Rutland, Catalin Marinas,
	Will Deacon, Kukjin Kim, Krzysztof Kozlowski,
	Javier Martinez Canillas, kbuild-all, Jaechul Lee, Andi Shyti,
	Chanwoo Choi, beomho.seo, galaxyra, linux-arm-kernel,
	linux-input, devicetree, linux-kernel, linux-samsung-soc

PTR_ERR should access the value just tested by IS_ERR

Generated by: scripts/coccinelle/tests/odd_ptr_err.cocci

CC: Jaechul Lee <jcsing.lee@samsung.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

I have only looked at the extract of code that is shown here.  It could be
the test that is wrong.

The code comes from:

url:
https://github.com/0day-ci/linux/commits/Jaechul-Lee/Add-touch-key-driver-su
pport-for-TM2/20170103-183357
:::::: branch date: 2 hours ago
:::::: commit date: 2 hours ago

 tm2-touchkey.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/input/keyboard/tm2-touchkey.c
+++ b/drivers/input/keyboard/tm2-touchkey.c
@@ -196,7 +196,7 @@ static int tm2_touchkey_probe(struct i2c
 				devm_regulator_get(&client->dev, "vdd");
 	if (IS_ERR(samsung_touchkey->regulator_vdd)) {
 		dev_err(&client->dev, "Failed to get vdd regulator\n");
-		return PTR_ERR(samsung_touchkey->regulator_vcc);
+		return PTR_ERR(samsung_touchkey->regulator_vdd);
 	}

 	/* power */

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] input: tm2-touchkey: fix odd_ptr_err.cocci warnings
@ 2017-01-03 13:39 ` Julia Lawall
  0 siblings, 0 replies; 3+ messages in thread
From: Julia Lawall @ 2017-01-03 13:39 UTC (permalink / raw)
  To: linux-arm-kernel

PTR_ERR should access the value just tested by IS_ERR

Generated by: scripts/coccinelle/tests/odd_ptr_err.cocci

CC: Jaechul Lee <jcsing.lee@samsung.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

I have only looked at the extract of code that is shown here.  It could be
the test that is wrong.

The code comes from:

url:
https://github.com/0day-ci/linux/commits/Jaechul-Lee/Add-touch-key-driver-su
pport-for-TM2/20170103-183357
:::::: branch date: 2 hours ago
:::::: commit date: 2 hours ago

 tm2-touchkey.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/input/keyboard/tm2-touchkey.c
+++ b/drivers/input/keyboard/tm2-touchkey.c
@@ -196,7 +196,7 @@ static int tm2_touchkey_probe(struct i2c
 				devm_regulator_get(&client->dev, "vdd");
 	if (IS_ERR(samsung_touchkey->regulator_vdd)) {
 		dev_err(&client->dev, "Failed to get vdd regulator\n");
-		return PTR_ERR(samsung_touchkey->regulator_vcc);
+		return PTR_ERR(samsung_touchkey->regulator_vdd);
 	}

 	/* power */

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-01-03 13:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-03 13:39 [PATCH] input: tm2-touchkey: fix odd_ptr_err.cocci warnings Julia Lawall
2017-01-03 13:39 ` Julia Lawall
2017-01-03 13:39 ` Julia Lawall

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.