From patchwork Sat Apr 8 17:18:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 9671135 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DEAFF601EB for ; Sat, 8 Apr 2017 17:20:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CDB0928427 for ; Sat, 8 Apr 2017 17:20:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C25D928433; Sat, 8 Apr 2017 17:20:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B43BD28427 for ; Sat, 8 Apr 2017 17:20:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752622AbdDHRUl (ORCPT ); Sat, 8 Apr 2017 13:20:41 -0400 Received: from smtp11.smtpout.orange.fr ([80.12.242.133]:39630 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752265AbdDHRUb (ORCPT ); Sat, 8 Apr 2017 13:20:31 -0400 Received: from localhost.localdomain ([92.140.162.58]) by mwinf5d89 with ME id 5tLT1v00E1FuJhY03tLUd6; Sat, 08 Apr 2017 19:20:28 +0200 X-ME-Helo: localhost.localdomain X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sat, 08 Apr 2017 19:20:28 +0200 X-ME-IP: 92.140.162.58 From: Christophe JAILLET To: dmitry.torokhov@gmail.com, linux@roeck-us.net Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH] Input: omap-keypad - fix error handling code Date: Sat, 8 Apr 2017 19:18:58 +0200 Message-Id: <20170408171858.7266-1-christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.11.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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);