提交 7fb45edb 编写于 作者: F Fabio Estevam 提交者: Dmitry Torokhov

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: NFabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
上级 a9728f97
...@@ -439,7 +439,7 @@ static int imx_keypad_probe(struct platform_device *pdev) ...@@ -439,7 +439,7 @@ static int imx_keypad_probe(struct platform_device *pdev)
irq = platform_get_irq(pdev, 0); irq = platform_get_irq(pdev, 0);
if (irq < 0) { if (irq < 0) {
dev_err(&pdev->dev, "no irq defined in platform data\n"); dev_err(&pdev->dev, "no irq defined in platform data\n");
return -EINVAL; return irq;
} }
input_dev = devm_input_allocate_device(&pdev->dev); input_dev = devm_input_allocate_device(&pdev->dev);
...@@ -449,7 +449,7 @@ static int imx_keypad_probe(struct platform_device *pdev) ...@@ -449,7 +449,7 @@ static int imx_keypad_probe(struct platform_device *pdev)
} }
keypad = devm_kzalloc(&pdev->dev, sizeof(struct imx_keypad), keypad = devm_kzalloc(&pdev->dev, sizeof(struct imx_keypad),
GFP_KERNEL); GFP_KERNEL);
if (!keypad) { if (!keypad) {
dev_err(&pdev->dev, "not enough memory for driver data\n"); dev_err(&pdev->dev, "not enough memory for driver data\n");
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册