Received: by 10.223.176.46 with SMTP id f43csp2405549wra; Thu, 25 Jan 2018 09:20:04 -0800 (PST) X-Google-Smtp-Source: AH8x225e69pOeh/sFElCAuLrol9oTdHn55406q6CoSvqh1PfDvoSygDz341GAfgVuC9fjBnFXwZG X-Received: by 2002:a17:902:2845:: with SMTP id e63-v6mr11448071plb.438.1516900804575; Thu, 25 Jan 2018 09:20:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516900804; cv=none; d=google.com; s=arc-20160816; b=P8hS5yt7mxE5OrBOB7IZHwtNVAWB/XP/hNxh9Q0wZmX/s+1hgfRnM+4XFejp2KRwTm 3puCO26ZmJQfkiFtNI/tqSRzw3ZcImgwtsoVGzYGDqVi88eMvYFx/TpAMUgmnYva4Qhr bwBx20zKygx/4EDwcFfF3Ya+04TMR+odH7Xx2jme1AnNVqSXGBe+8PJ8PwRsLSfo4S8w 8zLkun6gHcsBIa/wuuO9d8bd77iOY4rDOeiy48vNL2XLudBrFBB4f98w2pofIvt9vfQZ XUe226dPwTATEog/DqFH/wO3wm959G500LSp9arUoB760DoUadAs7M/ktMYhTAbpkMxI oM/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:mime-version:user-agent:date:message-id:subject :from:cc:to:arc-authentication-results; bh=iGV/vGQJFJ6w1qT6V9C7xzDVs7Jwu06rCtd8vYY3Cww=; b=PGZY0C32BRw3Pynzju5t5k7DIJJvBzE2cy0lrcSStkYsjHI6f2iDMj7xQJ+Kh1XbP9 XrcFGWQ0YaG0SyJs1kxRLAecW5gXdHHaSGFl6myjZFZdHofQcMypoDcyGhPQb5ImRR0L +/FcbEajza7voVZfX4Uf6HYpDOOCX9fbIJHPAerjXJDKo7Xu6sm5YXu2dcIu7RJyR8wX 9WZmCom80RXNvehNTlcwhZbEPkrO78grgzKlYBe2eUQN4z07u1CwFsfarY2jBTdevr5Z ZXd9F4lm8e39TJFP/UfKlO+2m6Yk0CLFDwycPLgT8IZj17EE4Nne/J1/xhYXmR2TdhIz sXtw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=sourceforge.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g7si1770291pgc.663.2018.01.25.09.19.49; Thu, 25 Jan 2018 09:20:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=sourceforge.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751219AbeAYRS7 (ORCPT + 99 others); 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-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; -- 2.16.1