From patchwork Sun Jan 21 19:19:00 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: 10177057 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 CB8D9604D4 for ; Sun, 21 Jan 2018 19:20:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B2AD027480 for ; Sun, 21 Jan 2018 19:20:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A6D5E27853; Sun, 21 Jan 2018 19:20:08 +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 4F47B26E56 for ; Sun, 21 Jan 2018 19:20:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751368AbeAUTUH (ORCPT ); Sun, 21 Jan 2018 14:20:07 -0500 Received: from mout.web.de ([212.227.17.11]:62373 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751238AbeAUTUG (ORCPT ); Sun, 21 Jan 2018 14:20:06 -0500 Received: from [192.168.1.3] ([77.181.34.161]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0Maaur-1eO9fz2Hjl-00K9qL; Sun, 21 Jan 2018 20:19:02 +0100 To: linux-input@vger.kernel.org, Andi Shyti , Dmitry Torokhov , =?UTF-8?B?R8O8bnRlciBSw7Zjaw==?= , Martin Kepplinger , Rob Herring , Simon Budig , =?UTF-8?Q?Stefan_Sch=c3=b6fegger?= From: SF Markus Elfring Subject: [PATCH] Input: edt-ft5x06: Delete an error message for a failed memory allocation in edt_ft5x06_ts_probe() Cc: LKML , kernel-janitors@vger.kernel.org Message-ID: <45f8a6c2-423b-5bc1-6512-c5b954c5620b@users.sourceforge.net> Date: Sun, 21 Jan 2018 20:19:00 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 Content-Language: en-GB X-Provags-ID: V03:K0:vJy6o8OcWWKclHUt9yUD6+XHvx+jVbLzCLxoqC8Fhw6hG8ZeG19 vQ9XDyH+Au4iIf9IMFpthPT+WipynxHe2MV9uCD3FHSzmnvY4S2DT6XvfSkUBfyVoLt1KKT YWFGz/gZRICPBrLL0kGvH+Y7dct/68Ly5KhsvpOJUgU+W2xtgF0oPjGnKfEKih4UxdnBoSt OrVHSXT/S/Pg7SrZfCbRA== X-UI-Out-Filterresults: notjunk:1; V01:K0:5ep8dJlPtLA=:XsXbas3trtquswSfY1aTUc MDfXoUJ8CBBtHOXG8tOJeN5kHYHnWmZDKHfBR60ghej42bBC5xa/Q73pJpf6DVzTfn4cvG0Vp 5OQyDgOpOY1VUBAehuhESRg79A3ZrbwfDZtxpX4IROCJu7RXX3Duc4GvSGE9NNhLebA8k6jrn 8x45TlEP6UkufjqIpcKrLBtUDrKCX3/PXED/kvhWP4X4wYHZuDuNQbRGVpUxkzuWumNbgLmxF nH1obmJltBJwrMD7+Em4ZQ7VamJNQhpOKbwtLyt0a2uKlSvhlb34lKtJss8FKfhN8pox94Hxt uHAjYcbD2abHvPv5tZyqJ67Vhy5A23kI3GViyUL7aowPjbHaWQiG0MDCqs/sv3WhJ0fX2toA4 sO1AzrjZLKF9oDx7Ippn4nalqAWRh0AqHZ9e/9LnGbMzKMSyQo+IF4/FMPWvlNXWf59w6ZSpd yYYvWUwgZoP3cMBVKzTEtGY7SA2B7NiattIJhC2bpPdVDVNtZcM94sgtIcnqTZ7k1QQE/Xfly c6JBvSjR922V6WlIEPiVDRI0aKYqu6dOHJJ9+XDPzgJSK89ORKCiI+Ook0GgoulRvY2RJW6Dw dzqZc0s+yW/izKQC032sklK7TUtT3kHmzEPNoh3GFhLNBca8cVJlrjY6zhy0NizHw5OU5U0Y3 SCR8AG/GhPEPqiFFVxCMX8rcx9RL+RojpPOBKZf4p7V5LGeB+rXV5Z+XpfVEoNcn1Y72EkZUn ghh/Yhi+BPPCIlvij0v0Al5UWy937XCaFQ2qrtGdFnZBxbY9e1EdFLftjWV8o1oNgBoTtZI0h QqZ4li4jryPlkq8SkZuqj1HL++zPtr56gWHtNKmO7aprs+WW+o= 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:10:03 +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 Acked-by: Martin Kepplinger Acked-by: Andi Shyti --- drivers/input/touchscreen/edt-ft5x06.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c index c53a3d7239e7..9d2799c90150 100644 --- a/drivers/input/touchscreen/edt-ft5x06.c +++ b/drivers/input/touchscreen/edt-ft5x06.c @@ -978,10 +978,8 @@ static int edt_ft5x06_ts_probe(struct i2c_client *client, dev_dbg(&client->dev, "probing for EDT FT5x06 I2C\n"); tsdata = devm_kzalloc(&client->dev, sizeof(*tsdata), GFP_KERNEL); - if (!tsdata) { - dev_err(&client->dev, "failed to allocate driver data.\n"); + if (!tsdata) return -ENOMEM; - } chip_data = of_device_get_match_data(&client->dev); if (!chip_data)