Input: imx_keypad - Propagate the real error code on platform_get_irq() failure
authorFabio Estevam <fabio.estevam@freescale.com>
Mon, 17 Feb 2014 19:31:36 +0000 (11:31 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 17 Feb 2014 19:37:13 +0000 (11:37 -0800)
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>
drivers/input/keyboard/imx_keypad.c

index cbf4f8038cbae434998e9aaa4f6120ed6f5f3c9a..97ec33572e563fce0ab5dfedf0aeaa966462f05c 100644 (file)
@@ -439,7 +439,7 @@ static int imx_keypad_probe(struct platform_device *pdev)
        irq = platform_get_irq(pdev, 0);
        if (irq < 0) {
                dev_err(&pdev->dev, "no irq defined in platform data\n");
-               return -EINVAL;
+               return irq;
        }
 
        input_dev = devm_input_allocate_device(&pdev->dev);
@@ -449,7 +449,7 @@ static int imx_keypad_probe(struct platform_device *pdev)
        }
 
        keypad = devm_kzalloc(&pdev->dev, sizeof(struct imx_keypad),
-                            GFP_KERNEL);
+                             GFP_KERNEL);
        if (!keypad) {
                dev_err(&pdev->dev, "not enough memory for driver data\n");
                return -ENOMEM;
This page took 0.02616 seconds and 5 git commands to generate.