mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
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 <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
This commit is contained in:
parent
a9728f9730
commit
7fb45edba8
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue