Thread (4 messages) 4 messages, 2 authors, 2025-10-18
STALE224d

[PATCH v2 1/2] Input: misc: Remove dev_err_probe() if error is -ENOMEM

From: Xichao Zhao <hidden>
Date: 2025-08-22 03:48:12
Also in: lkml
Subsystem: input (keyboard, mouse, joystick, touchscreen) drivers, qnap mcu driver, the rest · Maintainers: Dmitry Torokhov, Heiko Stuebner, Linus Torvalds

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 <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help