From patchwork Sat Jan 27 13:23:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 10187459 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 9283560385 for ; Sat, 27 Jan 2018 13:23:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7FEE828B61 for ; Sat, 27 Jan 2018 13:23:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 735DD28CF5; Sat, 27 Jan 2018 13:23:55 +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,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 120BA28B61 for ; Sat, 27 Jan 2018 13:23:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752565AbeA0NXy (ORCPT ); Sat, 27 Jan 2018 08:23:54 -0500 Received: from mout.web.de ([212.227.17.11]:61315 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751431AbeA0NXx (ORCPT ); Sat, 27 Jan 2018 08:23:53 -0500 Received: from [192.168.1.2] ([78.49.117.84]) by smtp.web.de (mrweb101 [213.165.67.124]) with ESMTPSA (Nemesis) id 0Llna8-1fElHC12AK-00ZT61; Sat, 27 Jan 2018 14:23:50 +0100 To: linux-input@vger.kernel.org, Dmitry Torokhov , Kees Cook Cc: LKML , kernel-janitors@vger.kernel.org From: SF Markus Elfring Subject: [PATCH] Input: imx_keypad: Delete an error message for a failed memory allocation in imx_keypad_probe() Message-ID: <41ac3033-4588-20de-c5e6-c4fd463e6c3a@users.sourceforge.net> Date: Sat, 27 Jan 2018 14:23:49 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 Content-Language: en-GB X-Provags-ID: V03:K0:TIG5zqAlW8btqsNw7JFZj3s6HRQZJkLxG0opkN0yjMBvtfitMYv Vwz3+tmQBvnb/NSN7rZnd4GppX7vXVTXHt7XAjurUwSzg5ZZDP9An/M5FxFajZmavIYGTd/ Hezt/fyeQeRpaJMag2zToG86Y73u+UMKSkS8ojlV2Jix+Y6/mUil1jtsEb8leRobCySq05h qsNcbEw8svBGpdZAji7JA== X-UI-Out-Filterresults: notjunk:1; V01:K0:hTrt9dy27uc=:j3Oag8/uPuAnBGfAqOjrEe s9LTy/BBQYvtCxqAUsoSn4+4905hXKqR+dVpU4dOP/WbK2h/KN9g+FxeWoR5vfxzL4IFkKVUt ZnYtYfc0ga2AH2ZQt0wOU219U2nFg8ySk5Qd777MU6Z+0tNU+2jQC5RaGd53PG+XP5ETQXMng SVyuSLASaj2baqNlp8KtV7CIKl+XeeBtBgKYhVYz15E7Cq+gTw63bVbHe3y3kgQbzHapfWfV4 YivXoAO0yhYqF1Le8uPjxwe+vm3d0hHFMEkF45ZOadOglpSlLh26D9AenqXX1l/jJQ65hQgrE mR6ZCZgzK+yrZxU+2DRU77nMCYIluz9t+aAb8P4izSSNDVNHJ9NAVBEn3ZfWjYThAHD05zjW+ KALwgtRzPr3fRFcZ4oC0n8z4MT9l7rYP7izQ4pe8XODbKYj+Zcdz/M+RKJG1apswW/c81Va6J 312Qp8lz4s8ldORaQpP9QVCsrJWy53fG62sP9yIDJX/A0R6mccRWNPSfwI0kWuFRTo+yF8SPp dBCpXzcCqebGoMgN0jGPkyq7/Zkh854gyjhI38+ERbMrBQfyAvDYjgRESdKbPI9ufot7dzLgp leE9FpplNjjUfFBbhDnQU5XsaLghMRcp40DshsLR42fRgwiC1aGHtCZD1kUboPaMO9eXhKcmz cnYiWBO9HD2rat9ZCqHcOL9UTRvKm53rAJzNdSHKnJiR8X3GACQTXpNCu3tHZGzR+6217onGm 0yRL4pCxsJfnt+VufNM65MVJpDtuIFSlOh2RWCCTo0P/irvv4x9VHddosS/sv5dTT8q2v6QrV qoAbj9AvpZqU0O7YO+mhhrbvBngQ17devdv+Kh8NHKz/lXn3Oo= 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 From: Markus Elfring Date: Sat, 27 Jan 2018 14:14:04 +0100 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/input/keyboard/imx_keypad.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/input/keyboard/imx_keypad.c b/drivers/input/keyboard/imx_keypad.c index 25d61d8d4fc4..859f9c9f3aae 100644 --- a/drivers/input/keyboard/imx_keypad.c +++ b/drivers/input/keyboard/imx_keypad.c @@ -447,10 +447,8 @@ static int imx_keypad_probe(struct platform_device *pdev) } keypad = devm_kzalloc(&pdev->dev, sizeof(*keypad), GFP_KERNEL); - if (!keypad) { - dev_err(&pdev->dev, "not enough memory for driver data\n"); + if (!keypad) return -ENOMEM; - } keypad->input_dev = input_dev; keypad->irq = irq;