Received: by 10.223.176.46 with SMTP id f43csp2062950wra; Sun, 21 Jan 2018 10:21:04 -0800 (PST) X-Google-Smtp-Source: AH8x225OejTSSgSbdVZHWjbGW645jw33c8S/GnSNVVXfqcI1NH3xGYkDBOC9RHqjbM2E49ACW4p3 X-Received: by 2002:a17:902:2943:: with SMTP id g61-v6mr90607plb.435.1516558864081; Sun, 21 Jan 2018 10:21:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516558864; cv=none; d=google.com; s=arc-20160816; b=lzUlGdc0nN1bwRxCxa601qS3SyXIGV0UOOwWqT6Qnnoe58LB+9PMNLGsNbZC0oxpsk YFqP8QqGcsvf4V7IDUdcIT0YTnQM19aO/lpuuo/YBNXi5qrgfS8og0QETAs6vqpXgqoe 39GuF+l+OE82cykm/CM3xDM3j/gZPgH6NHjrqAzwlwKejkOWpejXHvteVqkbs13KdW7B xyLyl8Qc0qCrLfDrcHkvjdXBe2Wlh7+bFXVaQSEOsp73a8kvjXUcyq9pN+KQCLD6xkDl RM1OK7eeniJ4O2egOw5J3P+B+PWO5uiitzrxKd0mxGl9vsakpP4r2+wFusBLbLLKB/Tr gOBQ== 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=yqwVSSZYMdRKOwdMSTzocnBD1y5D/ROwM2P4mEl8COY=; b=nsC1GYuh08I2fcGIqUlwY4l4aU3TAxSXwkOXEqRCSt/TCvSb+TOFbrk7iPL92lS0E6 dSABelryRaoSK1RDH9INZtKPG5CQ/E2bSEe7Sm5KuRESfJsb6/jBVDL5rlkbq94rHag3 DFVwqVHG9vheIfHFsfc4DylKm/4UiINsOVxzFhj/bFepmacL660VlEF5Ox+1RdAy1/8C 8p3gWMviA6UKquvE9sCd1tRyQxi3Am0XgnJScbs4q/ioCRsLuK8tCRPNu6lBN5JqdOX9 Z/XWUrOOzPijUJgY4K8HkHcARLqLfPQP0UNWFc11QNAdW7N3qE2T5Efyj+ghp7PLnZ4U WNpg== 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 p91-v6si2702079plb.614.2018.01.21.10.20.48; Sun, 21 Jan 2018 10:21: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 S1751309AbeAUSUY (ORCPT + 99 others); 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-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; -- 2.16.0