From patchwork Sun Jan 21 18:50:21 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: 10177043 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 4603460224 for ; Sun, 21 Jan 2018 18:51:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 322272580E for ; Sun, 21 Jan 2018 18:51:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 20A822621B; Sun, 21 Jan 2018 18:51:15 +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 C32532580E for ; Sun, 21 Jan 2018 18:51:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751215AbeAUSvN (ORCPT ); Sun, 21 Jan 2018 13:51:13 -0500 Received: from mout.web.de ([217.72.192.78]:56221 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750919AbeAUSvM (ORCPT ); Sun, 21 Jan 2018 13:51:12 -0500 Received: from [192.168.1.3] ([77.181.34.161]) by smtp.web.de (mrweb101 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MJCek-1eg5qf0fE2-002lIx; Sun, 21 Jan 2018 19:50:23 +0100 Subject: [PATCH 1/2] Input: egalax_ts: Delete an error message for a failed memory allocation in egalax_ts_probe() From: SF Markus Elfring To: linux-input@vger.kernel.org, Dmitry Torokhov , =?UTF-8?B?R8O8bnRlciBSw7Zjaw==?= Cc: LKML , kernel-janitors@vger.kernel.org References: <52f0c32d-2cf9-bef3-4fb3-4120c5b758c4@users.sourceforge.net> Message-ID: <99b5c583-e215-82eb-701c-6796b605fb92@users.sourceforge.net> Date: Sun, 21 Jan 2018 19:50:21 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <52f0c32d-2cf9-bef3-4fb3-4120c5b758c4@users.sourceforge.net> Content-Language: en-GB X-Provags-ID: V03:K0:wxyADTgeinx54/0N28pQN9Zxz5hBdcxoRUWyvjqWLSOVQUIQkeG HDU4ocvLumkADY+S9Spj0SON9IjTk+X3alHigJCZ/udo3ag3QLs4/IKk5Ut9NXKJdaoxT+p 4H3Ik4z1jwJerxbDwUWfauRhF0u5q3MRLjoaEfBOYG58tD2MJqAXtMKXodS/N28IOe2T572 uVaf6u9I/dDD+cpFYP51w== X-UI-Out-Filterresults: notjunk:1; V01:K0:2NBjJa7ES9g=:4ZVrMq05J0XdR4JqvTK0iA kGG3/VKFrld7/vqP9PNOolkQydMKOdCTYiRwrVT4pHcgTIc2WMWkgAHWTP8aq7j7kG42ZEPx+ d1QZn7w1yJUaN7a8Olc/Lhr0vqpabrIQ8l1qfSOEDpgatL6ec+QHlpf0gb3ewIQJu2QryXnlL AjOt4WNgEl+24rKsqfI6z5wiilJ73GLnIa2uIjBJKL02h/f6zH3kdNtdWQjzmnyfXB25DzvzM FY9ZdvrwUbX91Gy9CcJvxo0HCXeTNfSWuC3ACiLCUS5xXmQqsQ7nyOZj1lgsxJkzzgeQ4pyF+ VD951AVlUkkNnHfSjpiOZW1fBY5sJD+jYISRNGiim1fRdCzeq2w4KecMVii5K1b/5/bIkfISG 3ttD8OP7z6VbJ3WiSrW03avXCU7RduubEzvqsPLta9okZ0zxeBpfGQaJVtzKwPfrGTOpcUrtK Hts1Z+gK2A0WhA8GPcEj1OZ9SAEAY+qajuVnWjm4ew7iG+3lR5vtjHta9w+cxnScE9VaFtoz9 rwOUyzF8pCj4qoRpqXR0UwW5lO1bG1/5dgiY/0/bnPgxk5tyKFRBAly1Rg/MWme70Uksbj3NA punoXdsGOgwzf8mJqc4jAKAvI7BTsZUdB/3OdfDVC1ucj0ihhqUEh5wafe5C8VD8/IyGfgOOM dtWXaTiabCdYTXqL0zt4aRY4KHEv0uQelkmVTUZ71Inw3+lTskaCC30INDN2Z7dehcrCPP8uu qBlDnGC5mVhssKsu67lMHyYdp9vxt6K2MLMKXq58+yHy1NKMQjIWKqh6lxJmUot4dRmP4Mzop hNqzTVMymzbP3k7jRC1f8zjAiACdqry9gmOqzl1uUUbnza3Kfo= 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: Sun, 21 Jan 2018 19:34:38 +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/touchscreen/egalax_ts.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/input/touchscreen/egalax_ts.c b/drivers/input/touchscreen/egalax_ts.c index 752ae9cf4514..29ec1166626d 100644 --- a/drivers/input/touchscreen/egalax_ts.c +++ b/drivers/input/touchscreen/egalax_ts.c @@ -172,10 +172,8 @@ static int egalax_ts_probe(struct i2c_client *client, int error; ts = devm_kzalloc(&client->dev, sizeof(struct egalax_ts), GFP_KERNEL); - if (!ts) { - dev_err(&client->dev, "Failed to allocate memory\n"); + if (!ts) return -ENOMEM; - } input_dev = devm_input_allocate_device(&client->dev); if (!input_dev) {