From patchwork Sun Jan 21 21:15:16 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: 10177111 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 E3980601E7 for ; Sun, 21 Jan 2018 21:15:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D7D6B1FFEB for ; Sun, 21 Jan 2018 21:15:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CB8E1205AF; Sun, 21 Jan 2018 21:15:39 +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 82D581FFEB for ; Sun, 21 Jan 2018 21:15:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751295AbeAUVP1 (ORCPT ); Sun, 21 Jan 2018 16:15:27 -0500 Received: from mout.web.de ([217.72.192.78]:55823 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751047AbeAUVPZ (ORCPT ); Sun, 21 Jan 2018 16:15:25 -0500 Received: from [192.168.1.3] ([77.181.34.161]) by smtp.web.de (mrweb101 [213.165.67.124]) with ESMTPSA (Nemesis) id 0Maamb-1eNm161tA9-00K9e7; Sun, 21 Jan 2018 22:15:17 +0100 Subject: [PATCH 1/2] Input: auo-pixcir-ts: Delete an error message for a failed memory allocation in auo_pixcir_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: <4f101927-97fe-1d8d-2bd7-4d9c3e2de8c5@users.sourceforge.net> Date: Sun, 21 Jan 2018 22:15:16 +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:xDPZlnnyAEfXe2LwJrgffu8WCZDFAljh81zl1MsJRrmKfE0eFJr 9vji2LqA8NfSRjCbRqF/Lyn+g8CPe7nHm47tPCpbCBaEcJCAi9x0Ys931hI/HXMd04X7l7m XfmjZsFsqLYan7/AiM82F/skgrFazuYRRVpVGFqEHRhVrPyZ14gJ3/i0xHMycu0+2H4HjHU 040QaHa/cs/5+gRI97p6A== X-UI-Out-Filterresults: notjunk:1; V01:K0:4Hcu6JdcV1Y=:bQCNgnGy0LuxkS8jepuEVw nZdBqV9bcfvTqYr72Ax3ZknnW+HYTYqrjvHHSdCEYXgILAAfrV9sxEa8Cmud4D9mIlRK412nC o1aMEtTvNsF/eFWEyvQB4Tq98kHP7E7vj+4sL2DQqiAq3zYTKFMrSHTqKBD1j4TP3lnjVAwmU Xhs52/zvC0aQZxGXO4BwU1U6kR3ciw9CEBOCcLuoDdcXwUnaobfT2oXgckffi9i97yFiYudlz Ql2H0jKimBMzFJHnN3W4x4p5XA1fty9ZNn1zwCUVemqRKQGbCpUla756EBfIRAhMs9BjLUcjl f3rV9nHfmZm3bPGk/gzo5tWUK+5B7nUUDqLKLapwabNneDr9azLXpYdLKoUKkD7yW34A9iCfY 5xUgQWA/gGgb/EaJZC/XyLnBBqdivqu++H+HnRpF5iQLmDzOEqjzVedSYqKYWxLH+ut3/PtZY K/DP/5wQTaqW2NMOLFIU8B/wdIak4dPWmH+CwmOxxWcJKM+T/8smk/cNkx80FBbV7ZKAaWtgC 3nINEnXIer+QyGekyLnc4/cVPeYzCOVERtzIZUpYrY0CP5RCXy86qjrbY2i37bqXjrzc+18Cx NOjDAd8HDeDidkBucLTMXjyHLb7XO+S1CYUN9+l+6CEcDzBscY/SMGA51g2pQO+Mj8D4FvAFk 0AgP9V1vZ95570r87tYL095v60eZbcdL4VxiTRdjNcp/8qot3+xqi842GCzqk/gPTMIH+Ykdq GJgU8TmaZBZkZRSRjvRukREv/SPK0ynR92EKEVt5e5vQODhCnpqEIqvHZO9/fmOuF6dOi+SBl /PiNJrcGatLcnxIgzXdxCeHMja6LD8Umsn4EMsqw1i7ZRzQ3z8= 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 22:02:32 +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/auo-pixcir-ts.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/input/touchscreen/auo-pixcir-ts.c b/drivers/input/touchscreen/auo-pixcir-ts.c index 6592fc5d48b4..398e27c48a51 100644 --- a/drivers/input/touchscreen/auo-pixcir-ts.c +++ b/drivers/input/touchscreen/auo-pixcir-ts.c @@ -487,10 +487,8 @@ static struct auo_pixcir_ts_platdata *auo_pixcir_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); - } pdata->gpio_int = of_get_gpio(np, 0); if (!gpio_is_valid(pdata->gpio_int)) {