From patchwork Sun Jan 21 19:47:22 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: 10177065 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 D44F1601E7 for ; Sun, 21 Jan 2018 19:47:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C5E961FFF9 for ; Sun, 21 Jan 2018 19:47:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B93A8260CD; Sun, 21 Jan 2018 19:47:41 +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 662301FFF9 for ; Sun, 21 Jan 2018 19:47:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750914AbeAUTr1 (ORCPT ); Sun, 21 Jan 2018 14:47:27 -0500 Received: from mout.web.de ([212.227.17.11]:50579 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750890AbeAUTr0 (ORCPT ); Sun, 21 Jan 2018 14:47:26 -0500 Received: from [192.168.1.3] ([77.181.34.161]) by smtp.web.de (mrweb101 [213.165.67.124]) with ESMTPSA (Nemesis) id 0LeLKb-1f9M1p2Fy9-00qAXR; Sun, 21 Jan 2018 20:47:24 +0100 Subject: [PATCH 1/2] Input: da9034-ts: Delete an error message for a failed memory allocation in da9034_touch_probe() From: SF Markus Elfring To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: LKML , kernel-janitors@vger.kernel.org References: <44ae37ef-deaa-c963-e0f7-c407159afa0c@users.sourceforge.net> Message-ID: Date: Sun, 21 Jan 2018 20:47:22 +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: <44ae37ef-deaa-c963-e0f7-c407159afa0c@users.sourceforge.net> Content-Language: en-GB X-Provags-ID: V03:K0:KFK1P40MjTtdVU530y1Efe5UFq0raBzJzIFaniKKGJk1YbNnj0p dIfGB4D/0hwvpDDhqjHVZDlrt0iPaTYMcTaTp1dG67g1HUjvbsOUVjH/e7kfwOGWY6NbUlU nYAnnjO1JS6lfYdK13Nzz99oyg7vQ0DH92TndVsq0+FPs8SHMdqVC+27IbgiHzpBf74qcOS oG7EGcZvYgqvrT5EKBm9g== X-UI-Out-Filterresults: notjunk:1; V01:K0:dKLrEArJylI=:BLYV7t6BufOdV6PCTknPIr JoOAN5vyqITHQRj8WzkPD58VVyTuBndwYQD4cK4Eypjd5kHzewa0rTguJKZRX1esWPyV6L5rq bVu6hUvE24UvzOYg4go8fr6DIeaWXJBvDhLqdW8kN0sekcPvsnGXZnXwv5XLD15qkTi4u9tb9 Pscjuq05IZ6zKIPZOGLinK36elaHaZffr7w08BXImX807ZtbNPBUtnGZa5gdRHiEy2O8pmdQm t89G/jxMP5JZuYQUz5eT/Qw/cpC0RHVWmvO3CgJgAAnkyXLtSSR2T94exW6bf8Z2J2FoaYcZK k//PSc3iPZydCgxWhb7EqM9659bd7fjzbfh5w2AmB5EbHT6LbO9Vk/HJxDYydWCtx2BlVPHFv wx+kWElaLBDzZx5cLrj/IKtPWi9irzRYIpaHhU6AdwcDM7xBsT8Wnam4wwE59fZJI5EHvUOKh 911tk59zWn+Qd72B2f00QtQhwOXPxI+StBCEnt1XHCELpkVePmu+N+8smcTwqrG9BkgAIsP6A 5tbYVrDPbVRy0+7ls50E6Mk0cXF8MUPxB7hGcRU+Gdczzd9/0uDvhvkrsDAQ2b2jpbUsMKeed Jl9jKFHYxrgv5k3Pl8/FaRHTvkt8rkcdpHbCwe5VZ2isz9zhDs1BcIM/f96wM5bGZ4tCcd9/3 t8K5pY/YuU4sObni1vFcevouTmAlr1Itp8v6Pdjk3DFgpG+xmbZBCLDzB9UO5mPxXEiSHObI7 Z70w0jtCYzm77AuoFK5tV3IANaky15tuUagXm4U61+7AAOAbisulOcNjCyUDnlwbl9hEJ4GYc vecs91Q8wKyJ/UFMW8CYpuRKI/J+GoJVe3ePEabetHZFbI6lUU= 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:32:48 +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/da9034-ts.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/input/touchscreen/da9034-ts.c b/drivers/input/touchscreen/da9034-ts.c index 8264822dc4b9..b30cfe1e62da 100644 --- a/drivers/input/touchscreen/da9034-ts.c +++ b/drivers/input/touchscreen/da9034-ts.c @@ -305,10 +305,8 @@ static int da9034_touch_probe(struct platform_device *pdev) touch = devm_kzalloc(&pdev->dev, sizeof(struct da9034_touch), GFP_KERNEL); - if (!touch) { - dev_err(&pdev->dev, "failed to allocate driver data\n"); + if (!touch) return -ENOMEM; - } touch->da9034_dev = pdev->dev.parent;