From patchwork Sat Jan 27 14:20:25 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: 10187481 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 677B760383 for ; Sat, 27 Jan 2018 14:20:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5AC36284FC for ; Sat, 27 Jan 2018 14:20:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4EDC628647; Sat, 27 Jan 2018 14:20:37 +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 04650284FC for ; Sat, 27 Jan 2018 14:20:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752565AbeA0OUd (ORCPT ); Sat, 27 Jan 2018 09:20:33 -0500 Received: from mout.web.de ([212.227.17.12]:60109 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751902AbeA0OUc (ORCPT ); Sat, 27 Jan 2018 09:20:32 -0500 Received: from [192.168.1.2] ([78.49.117.84]) by smtp.web.de (mrweb102 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MHY1o-1ec8UH3tcK-003PFg; Sat, 27 Jan 2018 15:20:26 +0100 To: linux-input@vger.kernel.org, Dmitry Torokhov , Michael Hennerich Cc: LKML , kernel-janitors@vger.kernel.org From: SF Markus Elfring Subject: [PATCH] Input: adp5520-keys: Delete an error message for a failed memory allocation in adp5520_keys_probe() Message-ID: <9d0729d2-59ab-f116-aa12-0457ebde0041@users.sourceforge.net> Date: Sat, 27 Jan 2018 15:20:25 +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:ksc1Kno3k2wt7UI1ec5Rf7taFR1upCriMoA4sCc2eDvUA1J5BuM XeEg9QkDk550DyKgRomU99/szd4WAjdtUcbqYxn94zXoOWpcv5/FWQ4whPqf5bwVYue1TzB Bvh5UEl0PjLPLH5/DinXFccpsCEZPowwJeVCIG6ZOt4P1MB+ayUqZxQbxDIVMs8/xuf1W5n UkYBM8vI/Yn8ha/ONkhEA== X-UI-Out-Filterresults: notjunk:1; V01:K0:n4hKHJeCb38=:14YRYmA9D91haNRPCVetpK qEXx9uYsvbZjXdtrW3SjolqyuC2Po4s6RdNJM86quLldnmBwMtbCu6F178F4+ey6nNP7ygKac 68gULKhlK0wZl5/+CNx0HJnJ+keQH6ck2x0rHry3KLOLcQIPdvBa9dePq3T9/22ojfmO0rtBN Eu1pjh1Vn5NwcbaGc38uweE6te7uku1ShdPAH2K2iblksY0MolbhbXWhfSrHEx/oIKCXCNKiW 2kuf1EQsDm9KBwlIEctu8x+GoFanxeAecaVJBRnr+rT+841yG8GcF7Q0EyZpf0FBjvKWrq12Y XGsJON10JVQD8tqzrMCYSJiGy6NUuLyRGUza+KP0F5r/MqSKTW2tR3gTUkZjsiSrZGBPsY8mg LspREyRpAUbwC9UzgVZ4KNgqW5nOG8nwenPt35gx9F4DcYVSSdFI36TnF5u8H0KHeyC2LhO1w NWPvNqXKDtfz/vqOInrFX9k6elBT7PkccxKFGMxphKEz+QovfV4yh/OouQVql2+OHdquahV8w FWiKuo6NdBGF4XXJeNTpWZIvLi9V52L5W0aCEOiMF3KacPSucTAMIdqRWBqROA9JPnIYAeXVp tr6S+ni/k4MOVWiQfppMN+6ve8ubIGLaOgKALM5GNPnxncqe+bYwKV3Htbi/RWuYp3HI64zxT x8xmuOKsXnV7GTPz9v7HvzkakOPngwm7exkAHxLi33NukbOulzqpKpQOhGCQD+XWxHkCmrCRK qnX5W/ey7mJ3VSdyvu4mZgtsY9q8Cc9d4Qh4oOnpxX7pykbgl919cnWEPJw2y1klbo8Sj5QQr 2KntLi/AT2DToU17n41LbF0OCYx6/rsasoeh8MV/orVsyA+Lfs= 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 15:15:52 +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 Acked-by: Michael Hennerich --- drivers/input/keyboard/adp5520-keys.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/input/keyboard/adp5520-keys.c b/drivers/input/keyboard/adp5520-keys.c index f0b9b37bde58..72e01cb77881 100644 --- a/drivers/input/keyboard/adp5520-keys.c +++ b/drivers/input/keyboard/adp5520-keys.c @@ -91,10 +91,8 @@ static int adp5520_keys_probe(struct platform_device *pdev) return -EINVAL; dev = devm_kzalloc(&pdev->dev, sizeof(*dev), GFP_KERNEL); - if (!dev) { - dev_err(&pdev->dev, "failed to alloc memory\n"); + if (!dev) return -ENOMEM; - } input = devm_input_allocate_device(&pdev->dev); if (!input)