From patchwork Sat Jan 20 20:18:45 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: 10176707 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 022416056F for ; Sat, 20 Jan 2018 20:18:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D082120182 for ; Sat, 20 Jan 2018 20:18:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B0137204C4; Sat, 20 Jan 2018 20:18:59 +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 53C9520182 for ; Sat, 20 Jan 2018 20:18:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756618AbeATUS5 (ORCPT ); Sat, 20 Jan 2018 15:18:57 -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-Language: en-GB 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-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: 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 Reviewed-by: Heiko Stuebner --- 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");