Received: by 10.223.176.46 with SMTP id f43csp2082907wra; Sun, 21 Jan 2018 10:51:54 -0800 (PST) X-Google-Smtp-Source: AH8x226RAwwgy6C+XAja6T2YfTLRBbqpnyRQqmKAxqpcKHkJVO9JmtgZmkGOUv6+88WaWR4JL64L X-Received: by 10.101.80.6 with SMTP id f6mr5139558pgo.272.1516560714188; Sun, 21 Jan 2018 10:51:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516560714; cv=none; d=google.com; s=arc-20160816; b=nqkPqd3dKdbPJeDVRX3lIvIjX9uxwD/9BRAtLYS4YwGT0Y5VospnD00pMwMfDPscWV GN9O60dBunEOmXa2m2sK7D9ioNIH+UjBNqS9Pt5KXva7Vo4EkkVmK+Tb3dc07GJwNLKG Pf1tNcUcfCNywsuQCOK8thq189/z7BmJRCRUdsz/zMQApzlTI0f5vdx0P5RHSHcgexDW YajRNVCPh4dLXWvx8u7ahysOqEYYhmwLgcT2ntw68AzKF5vdXdSNGJFtcPTQRbcnOZLg P80vlUbpFDa42YLArMyYOFjAgdc8t+h20p/857NJpUti8f515G4rNwZFnE05a8Ez4aJp 3RLg== 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:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:from:subject:arc-authentication-results; bh=n0AXCHJTm4bLxAKO3Sy2minc2w2Q5voAoSHcziAdHrA=; b=gVUCUxi1tzz0GTolnfj2tGDzj25+umtZp5QPBRdcw5C9Ztj6tdZ/AQFugOtNDf423b WJNMLQiwDVvCtb5QN+P/vFPZqk7KTFuxMQuSFYvaGEopsY8bHIyecy847xof9cfsFD5u ad3pRrPb6dF5Y63P+hDuFHjuKC0zGDQJEPBRNV6b3WvZ1B5D1HKm0KXxvLt1vErCq6Fj W2iJJTl9KmTwQXMTo/rDmE2m1UYbfXYNC6j8V25BQfKbRC8E+6pjXXw7j/cLAML1smUV mbSsMwKJwroBgziH4iDe5L/GQoqo7PqEtbRg4hl9zs1AYkQc0Zmw8IdjavZCLMx7Ie6P Rg1A== 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 z3si12414838pgr.12.2018.01.21.10.51.39; Sun, 21 Jan 2018 10:51:54 -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 S1751426AbeAUSvO (ORCPT + 99 others); Sun, 21 Jan 2018 13:51:14 -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-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit 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-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: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) { -- 2.16.0