From patchwork Sun Jan 21 18:19:27 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: 10177037 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 4F748601E7 for ; Sun, 21 Jan 2018 18:20:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 33E1825F3E for ; Sun, 21 Jan 2018 18:20:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2841E2621B; Sun, 21 Jan 2018 18:20:28 +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 B0A3E25F3E for ; Sun, 21 Jan 2018 18:20:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750945AbeAUSUY (ORCPT ); Sun, 21 Jan 2018 13:20:24 -0500 Received: from mout.web.de ([212.227.17.11]:55927 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750912AbeAUSUX (ORCPT ); Sun, 21 Jan 2018 13:20:23 -0500 Received: from [192.168.1.3] ([77.181.34.161]) by smtp.web.de (mrweb102 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MTyDl-1eDANW2zZ3-00Ql7O; Sun, 21 Jan 2018 19:19:31 +0100 To: linux-input@vger.kernel.org, Dmitry Torokhov , =?UTF-8?B?R8O8bnRlciBSw7Zjaw==?= , Wolfram Sang Cc: LKML , kernel-janitors@vger.kernel.org From: SF Markus Elfring Subject: [PATCH] Input: mcs5000_ts: Delete an error message for a failed memory allocation in mcs5000_ts_probe() Message-ID: <47946655-de9f-f51f-3b6a-d5c76861e92a@users.sourceforge.net> Date: Sun, 21 Jan 2018 19:19:27 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 Content-Language: en-GB X-Provags-ID: V03:K0:pSv2ou0PSIP5B9ogZ0cLf5b5ABjCrrzX+z031RAgj6G1edQRnet Vf1nRXhye/Kjv6hIFYO7zWJZDnW2RDEdX9sIsHc4CpS6e0NtCzS/39sIlQL3s9o2ISgSv7q ibb1MyOtI5TzCcSX9SxrMykDoVWzyfc7CqfWMB9yKX6BvqoIg6vAx0AYuFX4fDpr41J/m62 lmD1ufMFFhvJ3KqOG+LJg== X-UI-Out-Filterresults: notjunk:1; V01:K0:8UY+3iS+Czg=:DfYOUcpipE3ACioyrCpOl1 e31tzEdTKMQ39rH7UiDa2utfhH/haA7wOw9Bxf4D3Ayb20fWmN5yOatba4SlirWIvvA64dnZj dWFdluMclIe4hc2+KQShB/uaEuGMccJ9hb/PlcbblXLFtmYrGKSeo4qKasvKqmxN1qZBP56it wqxtKc5lN/9dCjL+6Y/v+03Er8FEuxUJXJ8et2BSY/YR8btyDXSsxEU3qYK3fzYmlLDj4TonB 4+ZWYNbDOmzWhtTMi/KRmbsqLeITQriY/VEmSFu/56bTK6WTf71C6J23L+jj0vTLHjg8fwuiJ uyRGoC57HuQbSVPEBuCurdNLti7mUhocsuAOYrUuu2tAKLsnHBiZuJVovAphbtjiAcQEUOcgg KMA1vPJX/Bpodb3SRfx6Dvh4CCWT7578Ec/g8wYo2ZZ+Omg34jqXExPIIGDC9ucNPg/TbQqlc sr3e9I7WEYTFivV61PMZBRDzgXp2G6T5TWFK0nxGwHWTswWMY5f39kNSPTu6XA5TTz6cm/lwP cvjjMGkjJ43MOgBku1ZcLfEJJ8q/y/Q5Xd13coqvFTh/j11QjN1nyhO+Y/OEZY9oA0W4lG8Zg iUbn52qU3AnnEUUPVo4D2tWhteX1l5pwJ8HSNsDwqu0vfOyFgybLvUKytPvgVJulFSycM/Sz1 rBigAlkjQs1Wg7Yzd4akczixD6Yer6ZpigR+OX/rKp6RbDR8zWUfDocn7WIR25auvLErOGqCs RcX4cDunoimSU2UHN43SFR2ZRL64PFunpxzrf6BXcNg7WCSBwGGTXIPh9EEGsXeJlPgIiR2B5 6zhsyPzjh9DkcM4aW7MnjzSe4Nb5K+T6HY1xBEVnlbqqDNA+E4= 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:14:15 +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/mcs5000_ts.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/input/touchscreen/mcs5000_ts.c b/drivers/input/touchscreen/mcs5000_ts.c index 8868573133ab..ca3c5f78ab55 100644 --- a/drivers/input/touchscreen/mcs5000_ts.c +++ b/drivers/input/touchscreen/mcs5000_ts.c @@ -198,10 +198,8 @@ static int mcs5000_ts_probe(struct i2c_client *client, return -EINVAL; data = devm_kzalloc(&client->dev, sizeof(*data), GFP_KERNEL); - if (!data) { - dev_err(&client->dev, "Failed to allocate memory\n"); + if (!data) return -ENOMEM; - } data->client = client;