Skip to contentSkip to conversation

Input: matrix_keypad - propagate error code from matrix_keypad_build_keymap()

PATCH New Dmitry Torokhov 1 participant 1 message Oct 8

Subsystems (2)
lore
Share & tools
lore

Dmitry Torokhov

author maintainer
#0 lore raw

PATCH 1/1 Input: matrix_keypad - propagate error code from matrix_keypad_build_keymap()

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 [email protected]
Assisted-by LLM
---
 drivers/input/keyboard/matrix_keypad.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/keyboard/matrix_keypad.c +1 -1
index f4a63a7bdad1..596696a0773b 100644
@@ -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"))
Signature · 5 lines
2.56.0.385.gd3acb90ef8-goog


-- 
Dmitry