linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Input: Remove dev_err_probe() if error is -ENOMEM
@ 2025-08-22  3:47 Xichao Zhao
  2025-08-22  3:47 ` [PATCH v2 1/2] Input: misc: " Xichao Zhao
  2025-08-22  3:47 ` [PATCH v2 2/2] Input: zforce_ts - remove " Xichao Zhao
  0 siblings, 2 replies; 3+ messages in thread
From: Xichao Zhao @ 2025-08-22  3:47 UTC (permalink / raw)
  To: Heiko Stuebner, Dmitry Torokhov,
	open list:INPUT (KEYBOARD, MOUSE, JOYSTICK, TOUCHSCREEN)...,
	open list
  Cc: Xichao Zhao

The dev_err_probe() doesn't do anything when error is '-ENOMEM'.
Therefore, remove the useless call to dev_err_probe(), and just
return the value instead.
---
v2: Split each driver into a separate patch.
---
Xichao Zhao (2):
  Input: misc: Remove dev_err_probe() if error is -ENOMEM
  Input: zforce_ts - remove dev_err_probe() if error is -ENOMEM

 drivers/input/misc/qnap-mcu-input.c   | 2 +-
 drivers/input/touchscreen/zforce_ts.c | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

-- 
2.34.1


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

* [PATCH v2 1/2] Input: misc: Remove dev_err_probe() if error is -ENOMEM
  2025-08-22  3:47 [PATCH v2 0/2] Input: Remove dev_err_probe() if error is -ENOMEM Xichao Zhao
@ 2025-08-22  3:47 ` Xichao Zhao
  2025-08-22  3:47 ` [PATCH v2 2/2] Input: zforce_ts - remove " Xichao Zhao
  1 sibling, 0 replies; 3+ messages in thread
From: Xichao Zhao @ 2025-08-22  3:47 UTC (permalink / raw)
  To: Heiko Stuebner, Dmitry Torokhov,
	open list:INPUT (KEYBOARD, MOUSE, JOYSTICK, TOUCHSCREEN)...,
	open list
  Cc: Xichao Zhao

The dev_err_probe() doesn't do anything when error is '-ENOMEM'.
Therefore, remove the useless call to dev_err_probe(), and just
return the value instead.

Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com>
---
 drivers/input/misc/qnap-mcu-input.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/misc/qnap-mcu-input.c b/drivers/input/misc/qnap-mcu-input.c
index 76e62f0816c1..3be899bfc114 100644
--- a/drivers/input/misc/qnap-mcu-input.c
+++ b/drivers/input/misc/qnap-mcu-input.c
@@ -103,7 +103,7 @@ static int qnap_mcu_input_probe(struct platform_device *pdev)
 
 	input = devm_input_allocate_device(dev);
 	if (!input)
-		return dev_err_probe(dev, -ENOMEM, "no memory for input device\n");
+		return -ENOMEM;
 
 	idev->input = input;
 	idev->dev = dev;
-- 
2.34.1


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

* [PATCH v2 2/2] Input: zforce_ts - remove dev_err_probe() if error is -ENOMEM
  2025-08-22  3:47 [PATCH v2 0/2] Input: Remove dev_err_probe() if error is -ENOMEM Xichao Zhao
  2025-08-22  3:47 ` [PATCH v2 1/2] Input: misc: " Xichao Zhao
@ 2025-08-22  3:47 ` Xichao Zhao
  1 sibling, 0 replies; 3+ messages in thread
From: Xichao Zhao @ 2025-08-22  3:47 UTC (permalink / raw)
  To: Dmitry Torokhov,
	open list:INPUT (KEYBOARD, MOUSE, JOYSTICK, TOUCHSCREEN)...,
	open list
  Cc: Xichao Zhao

The dev_err_probe() doesn't do anything when error is '-ENOMEM'.
Therefore, remove the useless call to dev_err_probe(), and just
return the value instead.

Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com>
---
 drivers/input/touchscreen/zforce_ts.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/input/touchscreen/zforce_ts.c b/drivers/input/touchscreen/zforce_ts.c
index df42fdf36ae3..a360749fa076 100644
--- a/drivers/input/touchscreen/zforce_ts.c
+++ b/drivers/input/touchscreen/zforce_ts.c
@@ -747,8 +747,7 @@ static int zforce_probe(struct i2c_client *client)
 
 	input_dev = devm_input_allocate_device(&client->dev);
 	if (!input_dev)
-		return dev_err_probe(&client->dev, -ENOMEM,
-				     "could not allocate input device\n");
+		return -ENOMEM;
 
 	ts->client = client;
 	ts->input = input_dev;
-- 
2.34.1


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

end of thread, other threads:[~2025-08-22  3:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-22  3:47 [PATCH v2 0/2] Input: Remove dev_err_probe() if error is -ENOMEM Xichao Zhao
2025-08-22  3:47 ` [PATCH v2 1/2] Input: misc: " Xichao Zhao
2025-08-22  3:47 ` [PATCH v2 2/2] Input: zforce_ts - remove " Xichao Zhao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).