Input: omap-keypad - fix error handling code
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Tue, 11 Apr 2017 03:48:16 +0000 (20:48 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 11 Apr 2017 03:51:49 +0000 (20:51 -0700)
According to the previous error handling code, it is likely that 'goto
err_free_keymap' is expected here in order to avoid a memory leak in error
handling path.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/keyboard/omap4-keypad.c

index ebc67ba..940d38b 100644 (file)
@@ -358,7 +358,7 @@ static int omap4_keypad_probe(struct platform_device *pdev)
                                     "omap4-keypad", keypad_data);
        if (error) {
                dev_err(&pdev->dev, "failed to register interrupt\n");
-               goto err_free_input;
+               goto err_free_keymap;
        }
 
        device_init_wakeup(&pdev->dev, true);