mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Input: matrix_keypad - propagate error code from matrix_keypad_build_keymap()
@ 2026-10-08  5:40 Dmitry Torokhov
  0 siblings, 0 replies; only message in thread
From: Dmitry Torokhov @ 2026-10-08  5:40 UTC (permalink / raw)
  To: linux-input; +Cc: linux-kernel

When switching to managed resources in matrix_keypad_probe(), the error
return path after matrix_keypad_build_keymap() was replaced with a
hardcoded -ENOMEM instead of propagating the real error code.

Return the original error so the actual failure reason is preserved.

Fixes: 7d0f351da460 ("Input: matrix_keypad - switch to using managed resources")
Reported-by: sashiko-bot@kernel.org
Assisted-by: LLM
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
 drivers/input/keyboard/matrix_keypad.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/keyboard/matrix_keypad.c b/drivers/input/keyboard/matrix_keypad.c
index f4a63a7bdad1..596696a0773b 100644
--- a/drivers/input/keyboard/matrix_keypad.c
+++ b/drivers/input/keyboard/matrix_keypad.c
@@ -443,7 +443,7 @@ static int matrix_keypad_probe(struct platform_device *pdev)
 					 NULL, input_dev);
 	if (err) {
 		dev_err(&pdev->dev, "failed to build keymap\n");
-		return -ENOMEM;
+		return err;
 	}
 
 	if (!device_property_read_bool(&pdev->dev, "linux,no-autorepeat"))
-- 
2.56.0.385.gd3acb90ef8-goog


-- 
Dmitry

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-08  5:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-08  5:40 [PATCH] Input: matrix_keypad - propagate error code from matrix_keypad_build_keymap() Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®