From patchwork Thu Jan 25 17:18:54 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: 10184373 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 12F0860388 for ; Thu, 25 Jan 2018 17:19:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E75B428876 for ; Thu, 25 Jan 2018 17:19:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D531828A90; Thu, 25 Jan 2018 17:19:00 +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 586E428A90 for ; Thu, 25 Jan 2018 17:19:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751169AbeAYRS7 (ORCPT ); Thu, 25 Jan 2018 12:18:59 -0500 Received: from mout.web.de ([212.227.15.3]:53409 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750992AbeAYRS5 (ORCPT ); Thu, 25 Jan 2018 12:18:57 -0500 Received: from [192.168.1.2] ([92.227.186.52]) by smtp.web.de (mrweb003 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MKIti-1efJfd1uXm-001lr9; Thu, 25 Jan 2018 18:18:55 +0100 To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: LKML , kernel-janitors@vger.kernel.org From: SF Markus Elfring Subject: [PATCH] Input: kxtj9: Delete an error message for a failed memory allocation in kxtj9_probe() Message-ID: <0d5cb90a-28e7-544b-3b77-3e50f11edb15@users.sourceforge.net> Date: Thu, 25 Jan 2018 18:18:54 +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:YD/nD/CBczRQ78PM7AaZd9sQu63IG+zveXcVA868EQUn4JlQZ6x s3uX9EGOs9VK2W1KiVb5bVowwLRT8U6GgbcHhFNgkYejmXJQiIMI75llsavcE82dlsL9x2n dCwqNxIJXeSJk3KJr/qXDahdtxl+0je2ldqvU5AyY1aSZnTa9PiUoaDPHFPn/ycP3XTNL/C SnrZanHahfz3AckIgKB/w== X-UI-Out-Filterresults: notjunk:1; V01:K0:X0QSWVc8Mjk=:Qx9qEru0ds3rBfh/EXW3mX GsE+JVek7vasuQvJ580zHE0y/zQURYGgdFshisrg4FJ72SJ5fgOPZcL7nC8SnsrlazmTaTomZ 1fjMoQAzDrdbc70TBszDKz4J59j7a5ixcrdDbc/FYvQkKJAAWNDBH3AkPKEkOBrFp1131Ysrc 5epXcuTKgSMVpyI2GMK3iz/wk/K8w8X5eBoYC0m7G/DtBT+Kp2RBTqaC8LskFdfeGrT5EAIUY D51YPCrgogRGHvmg09V/2MWOOsLLSiZ27blpB0HLRlvVoAOBWVc7VqYXh9qkjdbDWIyMY5rTz BLihmbOfLDn29g+1W0jICTvCJw+wT9CqDfxrbJEtHaM3pNsDfgP3J6jvEHKKnD+Kz++WPAmxw P7GSWDSfPZZNaABXvimBbgY34YxiQak45xdoWhRh2f6l3s+d/D13ZqvyJgtDISxi0cIXLTdns tWmN9M/9dr2yutVW5VTtHdm3448D56oWvC7G+ozHDopwOaO7JCk0kAyHNSAoCfjZsqpv5jX0p 7T5ekLS3UqjssKi+7JfPsuMc4MV3+9Z8LQI7XPqrPTcCL57YIPTJGD4as5FUrQnG2zo/uG9XY l1Rhtndl3gOk5jDizI7eeT7gVubE8Vj8ooQmNV9J+4JBsZFzlr4B+IcnC3ZZhbxP1RhQ2YBFk RYs/7cgB73+0I1/g7LgOXrzKrgUHI6IvPX8dZ8IlbCb7HknLllnUvMCDirdDEfHBP+l4Yg+tc urEpah2/qTlmv+A5sla6QRB05jTgsgkguL6WYcOQAW8GowvFxxK8EwGwsNeV+2TEkdW/Nq7GW YeipcPBoCgrXnMX6xhi0NTD/PB3lGGtInEpzQkILACaI206Ku8= 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: Thu, 25 Jan 2018 18:13:57 +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/misc/kxtj9.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/input/misc/kxtj9.c b/drivers/input/misc/kxtj9.c index efaffcc57e36..ddd5ca6812cb 100644 --- a/drivers/input/misc/kxtj9.c +++ b/drivers/input/misc/kxtj9.c @@ -526,11 +526,8 @@ static int kxtj9_probe(struct i2c_client *client, } tj9 = kzalloc(sizeof(*tj9), GFP_KERNEL); - if (!tj9) { - dev_err(&client->dev, - "failed to allocate memory for module data\n"); + if (!tj9) return -ENOMEM; - } tj9->client = client; tj9->pdata = *pdata;