From patchwork Sun Jan 21 20:27:28 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: 10177077 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 1B119601E7 for ; Sun, 21 Jan 2018 20:27:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0B63526224 for ; Sun, 21 Jan 2018 20:27:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0037C26E3C; Sun, 21 Jan 2018 20:27:35 +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 A3AA926224 for ; Sun, 21 Jan 2018 20:27:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751121AbeAUU1e (ORCPT ); Sun, 21 Jan 2018 15:27:34 -0500 Received: from mout.web.de ([217.72.192.78]:60881 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751068AbeAUU1d (ORCPT ); Sun, 21 Jan 2018 15:27:33 -0500 Received: from [192.168.1.3] ([77.181.34.161]) by smtp.web.de (mrweb102 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MfqAq-1eOy5V0JXA-00NCta; Sun, 21 Jan 2018 21:27:29 +0100 Subject: [PATCH 1/3] Input: cyttsp4_core: Delete two error messages for a failed memory allocation in cyttsp4_probe() From: SF Markus Elfring To: linux-input@vger.kernel.org, Dmitry Torokhov , Ferruh Yigit Cc: LKML , kernel-janitors@vger.kernel.org References: <61183426-0b2a-4b93-933c-a2dfd487d92b@users.sourceforge.net> Message-ID: <2ca4b5f1-2b2f-19f4-d0ce-95586bb9d5cd@users.sourceforge.net> Date: Sun, 21 Jan 2018 21:27:28 +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: <61183426-0b2a-4b93-933c-a2dfd487d92b@users.sourceforge.net> Content-Language: en-GB X-Provags-ID: V03:K0:iD5EMKoBkTtjss3LshzBmTlvp09ed4kI9rd8WzlEkLDIwwF3+bM dL5kzU6EleMccdD0B1WphQr1/OFnapTC6+90EeUbf+omwslcQtaQt85DhqiM6uFF6uYIJYq ywdqGWQe1Pp44byIATZiV3x2ZohSvrEtq3TAIPu9TjhRXdMC2eT8J4HHszc36BHQtJbq1Tq XMAfYLnDC0sEF6cme00yA== X-UI-Out-Filterresults: notjunk:1; V01:K0:Z7pmOIKUIQo=:ZaDnyZDQe2jycmaJMgFnfH sl0At9uynEFIk8PbvKVCBgYcWowvHQWGTA3I2OCR9L27EE4wERkdDbGJzOiQ4d8t/NmUXVJV6 uQQJmXJRBOHxPSDAuUpVSt8hwnvrfxIHRBTaXQ1iFtTFnJvvgngUccQbbMzeHZgNM9VBTgdUe chjd21v7N/eaLOxcxBKgaDG3C0PO3XEPdRy4U4hcG99uyeG9o5p+uj6ivmQz81LD35/vdJZtI MJa8dfKnTbrdyHgeophVQglLiAdNaSEN4dd/xsXugHf5Vu5yTk9yXb5hhPvfsXguD5sKkSgSp eJ2S7NjNo8RdjesbkNCse8anHR0WWz4P3fOk3PmfkX2flDO0ObBYLzG5F+Ce0phmCqcgKLDQ4 6MlqE8AQfPJK+hNGezffQ3eI7ljTsyPjYI2+BJmeRLapLkr3TT3bDSeq68jBGEhset6+OAJf4 5Vq3AVXJSaHp1tKZIwtOBr3a0wDSGJEsIB16OdufNi/xisoNjDo9wIldWiACbsECtA5kCtP/1 G0GcQ90QL27vCa0NeVhYth+zd7LpYcy/hWXXnPNdvknaznPvmD3p80RX2jRkGjkVgm0IZ7Y3M k6s/cDmMoXHmddLCZ0OAfmoc1e5Ax7399/c0JqHgtxyf0uwklKRvxuGc01RNy1KDPJ1rcPzrK /hsmGpVrjAOrXt61W4Oy4M7ymV7Svirzm42xiW2b3D6fYRbYvV0uo6/dZ0A7JzLXJXvZWhFeO wEWTgqHjdFMxKbFheL/p7UsmgK62mksDDJw6geRkEmVt3X5rABoVg3bAu6NovlgkWcMuSYSE0 yYouDkbwZf+CYfzBqln+XOf/6D7amT7m6ao5e6rmmD7sf7PNhw= 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 20:57:40 +0100 Omit extra messages 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/cyttsp4_core.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/input/touchscreen/cyttsp4_core.c b/drivers/input/touchscreen/cyttsp4_core.c index 727c3232517c..f0bf3cc20e9d 100644 --- a/drivers/input/touchscreen/cyttsp4_core.c +++ b/drivers/input/touchscreen/cyttsp4_core.c @@ -2037,14 +2037,12 @@ struct cyttsp4 *cyttsp4_probe(const struct cyttsp4_bus_ops *ops, cd = kzalloc(sizeof(*cd), GFP_KERNEL); if (!cd) { - dev_err(dev, "%s: Error, kzalloc\n", __func__); rc = -ENOMEM; goto error_alloc_data; } cd->xfer_buf = kzalloc(xfer_buf_size, GFP_KERNEL); if (!cd->xfer_buf) { - dev_err(dev, "%s: Error, kzalloc\n", __func__); rc = -ENOMEM; goto error_free_cd; }