Received: by 10.223.176.46 with SMTP id f43csp1165560wra; Sat, 20 Jan 2018 12:19:44 -0800 (PST) X-Google-Smtp-Source: AH8x226WwH0jeM3GngNv2saTekzyNJs8tFX7pUdJHTF6LbRpcu5zs2o+4/OSaSNBbnYQnmLcf0eP X-Received: by 10.99.172.25 with SMTP id v25mr2884594pge.148.1516479584040; Sat, 20 Jan 2018 12:19:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516479584; cv=none; d=google.com; s=arc-20160816; b=ZYd87ihNBdwoBfjzx2MAinK7UhzE561qesK6jQL33xRk7jxNqULl/EJACn44OyLfct mLsgxv20mXEE8Ph79KARttJg1GxfYJtPek6k+ZsqQZe4uTQJjioQvxfo0Im78Z56WiDb UicSbwwNigi1QCtCD6Gqan2DqC9QtSDtRB4vh3n1aofDAFq/UBZ/ucig+/wpbumba8c6 ykIJq+d8r6UOfx1XkqgeTALhaLVojNJxGktzOmJzbCuqzl83Jf/svzzVh/6OdT+zuoBn yI2QCehdmvaAxzsG7WTpiBXUdEaFhA9dFUNcPeG0nAnO465kYbYu2zdf/E7uqm8xCvnc frzw== 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=6wLCO9UFdbVPyNA3uejmBCJMqEAzPtqTcEBNqMP8v+g=; b=ojdrz1Av7RFKbXnw7tT7RABiVJzI2wUJ03vO1fzq4MjR9kdHQcFvrz/UAkZamC+qeh xaVo7UqIykQvTPnmMpkpyJSU8HS7VBzx4xI6DUUuA9U8C2+iEPUJ6Ax05MVRbnhVQfjt rGGJq6wiPON31CDPB5TuvJDplwcA5RW/yTXTwqlm7cshB58ETnDZn6HD3foqxDqiRxgD XyLp9gMqEImk7yML4N5/2mrlxiIKOWem6GEpsI5iP+e9AB5OwV5hA8e+3Mlqjs9oJY56 B+i2Hh8YReA40soxFbIfTDH3A7Q/xeWEER95L92tkSXfmBnnTDSf9KLFteQ+J8nVHJsi x2Sw== 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 f71si10896983pgc.477.2018.01.20.12.19.30; Sat, 20 Jan 2018 12:19:43 -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 S1756707AbeATUTA (ORCPT + 99 others); Sat, 20 Jan 2018 15:19:00 -0500 Received: from mout.web.de ([217.72.192.78]:65298 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756578AbeATUS4 (ORCPT ); Sat, 20 Jan 2018 15:18:56 -0500 Received: from [192.168.1.3] ([77.182.145.92]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0LwYnz-1esaZT2qY3-018O98; Sat, 20 Jan 2018 21:18:48 +0100 Subject: [PATCH 1/2] Input: zforce_ts: Delete an error message for a failed memory allocation in zforce_parse_dt() From: SF Markus Elfring To: linux-input@vger.kernel.org, Dmitry Torokhov , =?UTF-8?Q?Heiko_St=c3=bcbner?= Cc: LKML , kernel-janitors@vger.kernel.org References: Message-ID: <2f111be7-11cd-d4a5-3c42-92290c1597d2@users.sourceforge.net> Date: Sat, 20 Jan 2018 21:18:45 +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: Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:X/nzfWo53X3RTz5ZhCZ5yWHWu3uH8/WOAIyuKsOf5n0BFkkbZV+ DLEOyI/joY65e8ZjKMVj1fEseaLrEPF2xy0xhLg8w8rGLtNYR/hmQ0TbMfgdqv87Z+b0w/F HH8EEXcZoKvGR6XmCym3JbQI9yALwmc+sYdpKMbpfgai+dTtKrVWDScdR6DM5VP8yG23iF5 tRLs0dvaT7WQ1q7Imr26g== X-UI-Out-Filterresults: notjunk:1;V01:K0:JUQFYTPRo7M=:JFX8LQsUvKC2gBa2wd4Sod GjvDoQc72Uo2YGuh/n2VtnEaOFseIESkYqxCmHYPIVNjax+oA9ujec2iZUkbk4fOHMCG3/M/z Ibf6ShFX5gNCuxzyoCrwL8V8ouugsM9uvXRqCtw8BynF5hLe5hJ2tFmU5j8jbt/fs8x80d3AC TongGgSE6aQ9X4MroCafd9SMOMoaMnZyDyitvce7n4KSLW60T+FtcLbzasD6UO88aLofawU3v /CPe2WiCAXJmH9bjfkkjiNVLRJFK9Cf5h1e7GAe8lSenHAvt3EoIYWIO6M6uSIcJtup7VFzJN btsX3rITWGNn4WyB5pTDJlgsvmjjr7Bf+1g8zDS1fA85cyK4BwKdyLYTsJe8bruj50SrtnvKt 6MYqY2ICELcVGE8SM1qzQL49yuXRfO6aH6rfOZnBjDGgdNVdeFvnZTG4XcUg/v+Smsr7B0Wz9 MJOsLrip2I7sdchqm9k277OSJZjGPmtTSxGhISs4+39qiPi4Cvj2RXPBpFSk2bLhHebNOFxX0 FQ6ID2ulV2uj4NsV0WSZsyDHb7WogoIXG2C/HhNbnpuiCB+DNtttP9+NqfyOIC/GKm0oHCShF htgROcOcozUQ/dY38GAd4KJyArEFgRVO8di/TwFywhM9JxHj2o75LazYJu8gbrbLhvIT88S+N /iQTPTqK9GP1BAvWBVUbqdw3/svwQGCzq6OnOj9S/ImUx2GItHwvKVSXd6wMnhYg1t2C+6DyF 6mWek2NidC29F5IThzDJdH/bkVE7LrXNEALlyn2jUk8a9fIsLMAUIOxYs39mP5F+XoDKrcNrb 7uctIYvUHzs2RgdQq64HeLoBwfKZJRrAEi9yYXeQfaFRkmFOUU= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Markus Elfring Date: Sat, 20 Jan 2018 20:36:33 +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/zforce_ts.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/input/touchscreen/zforce_ts.c b/drivers/input/touchscreen/zforce_ts.c index 7b3845aa5983..9fb6b3f201f9 100644 --- a/drivers/input/touchscreen/zforce_ts.c +++ b/drivers/input/touchscreen/zforce_ts.c @@ -722,10 +722,8 @@ static struct zforce_ts_platdata *zforce_parse_dt(struct device *dev) return ERR_PTR(-ENOENT); pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL); - if (!pdata) { - dev_err(dev, "failed to allocate platform data\n"); + if (!pdata) return ERR_PTR(-ENOMEM); - } if (of_property_read_u32(np, "x-size", &pdata->x_max)) { dev_err(dev, "failed to get x-size property\n"); -- 2.15.1