summaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2014-02-17 14:31:36 -0500
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2014-02-17 14:37:13 -0500
commit7fb45edba8b5206e645572a682c946f67375447e (patch)
tree2cfe635a59814f7221415ddacbb60150deccb1fb /drivers/input
parenta9728f9730c915bcd3d3010565946195b9f19e1d (diff)
Input: imx_keypad - Propagate the real error code on platform_get_irq() failure
No need to return a 'fake' return value on platform_get_irq() failure. Just return the error code itself instead. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/keyboard/imx_keypad.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/input/keyboard/imx_keypad.c b/drivers/input/keyboard/imx_keypad.c
index cbf4f8038cba..97ec33572e56 100644
--- a/drivers/input/keyboard/imx_keypad.c
+++ b/drivers/input/keyboard/imx_keypad.c
@@ -439,7 +439,7 @@ static int imx_keypad_probe(struct platform_device *pdev)
439 irq = platform_get_irq(pdev, 0); 439 irq = platform_get_irq(pdev, 0);
440 if (irq < 0) { 440 if (irq < 0) {
441 dev_err(&pdev->dev, "no irq defined in platform data\n"); 441 dev_err(&pdev->dev, "no irq defined in platform data\n");
442 return -EINVAL; 442 return irq;
443 } 443 }
444 444
445 input_dev = devm_input_allocate_device(&pdev->dev); 445 input_dev = devm_input_allocate_device(&pdev->dev);
@@ -449,7 +449,7 @@ static int imx_keypad_probe(struct platform_device *pdev)
449 } 449 }
450 450
451 keypad = devm_kzalloc(&pdev->dev, sizeof(struct imx_keypad), 451 keypad = devm_kzalloc(&pdev->dev, sizeof(struct imx_keypad),
452 GFP_KERNEL); 452 GFP_KERNEL);
453 if (!keypad) { 453 if (!keypad) {
454 dev_err(&pdev->dev, "not enough memory for driver data\n"); 454 dev_err(&pdev->dev, "not enough memory for driver data\n");
455 return -ENOMEM; 455 return -ENOMEM;