linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Input: omap-keypad - fix error handling code
@ 2017-04-08 17:18 Christophe JAILLET
  2017-04-11  3:48 ` Dmitry Torokhov
  0 siblings, 1 reply; 2+ messages in thread
From: Christophe JAILLET @ 2017-04-08 17:18 UTC (permalink / raw)
  To: dmitry.torokhov, linux
  Cc: linux-input, linux-kernel, kernel-janitors, Christophe JAILLET

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>
---
 drivers/input/keyboard/omap4-keypad.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/keyboard/omap4-keypad.c b/drivers/input/keyboard/omap4-keypad.c
index ebc67ba41fe2..940d38b08e6b 100644
--- a/drivers/input/keyboard/omap4-keypad.c
+++ b/drivers/input/keyboard/omap4-keypad.c
@@ -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);
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Input: omap-keypad - fix error handling code
  2017-04-08 17:18 [PATCH] Input: omap-keypad - fix error handling code Christophe JAILLET
@ 2017-04-11  3:48 ` Dmitry Torokhov
  0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2017-04-11  3:48 UTC (permalink / raw)
  To: Christophe JAILLET; +Cc: linux, linux-input, linux-kernel, kernel-janitors

On Sat, Apr 08, 2017 at 07:18:58PM +0200, Christophe JAILLET wrote:
> 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>

Applied, thank you.

> ---
>  drivers/input/keyboard/omap4-keypad.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/input/keyboard/omap4-keypad.c b/drivers/input/keyboard/omap4-keypad.c
> index ebc67ba41fe2..940d38b08e6b 100644
> --- a/drivers/input/keyboard/omap4-keypad.c
> +++ b/drivers/input/keyboard/omap4-keypad.c
> @@ -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);
> -- 
> 2.11.0
> 

-- 
Dmitry

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-04-11  3:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-08 17:18 [PATCH] Input: omap-keypad - fix error handling code Christophe JAILLET
2017-04-11  3:48 ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).