From patchwork Thu Jan 25 20:41:43 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: 10184791 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 4CF3D60383 for ; Thu, 25 Jan 2018 20:41:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3C2C9288A2 for ; Thu, 25 Jan 2018 20:41:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2E28428A42; Thu, 25 Jan 2018 20:41:52 +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 CD1E1288A2 for ; Thu, 25 Jan 2018 20:41:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751171AbeAYUlu (ORCPT ); Thu, 25 Jan 2018 15:41:50 -0500 Received: from mout.web.de ([212.227.15.3]:59522 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751138AbeAYUlt (ORCPT ); Thu, 25 Jan 2018 15:41:49 -0500 Received: from [192.168.1.2] ([92.227.186.52]) by smtp.web.de (mrweb004 [213.165.67.108]) with ESMTPSA (Nemesis) id 0M37rD-1exJGR1Jpf-00suzg; Thu, 25 Jan 2018 21:41:44 +0100 To: linux-input@vger.kernel.org, linux-tegra@vger.kernel.org, Dmitry Torokhov , Jonathan Hunter , Laxman Dewangan , Rakesh Iyer , Thierry Reding Cc: LKML , kernel-janitors@vger.kernel.org From: SF Markus Elfring Subject: [PATCH] Input: tegra-kbc: Delete an error message for a failed memory allocation in tegra_kbc_probe() Message-ID: <4b9b77a1-e5af-21c9-f219-be72430fc76f@users.sourceforge.net> Date: Thu, 25 Jan 2018 21:41:43 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 Content-Language: en-GB X-Provags-ID: V03:K0:93YlcWPsqlZ6HYLyYPi5d3M+8p+oE9jfzHfZEVDjY7HJn87b2Zw sX181iF7MLWCzZj7SoaY7NidGsXy/MP2w82DJfdKgH+Bt5k86ggFwGyv0YOXrC2rvHmZSeb bMRS+JFLaT4Ksy9JupuDdYlDG2FtPcThGfgu08g3pl1XVumnK0ssXbFQDKmZZPPJmcbd8Wr wfD0mhlOtrMtBzCHEixWw== X-UI-Out-Filterresults: notjunk:1; V01:K0:tRCELiHrs6E=:DVMWtW4SS6F6pcX4W689zL FjBSk+hQt411+9JbrXAjPzofZZzlEtUF2sQJVwIvL+exX8tcvjAeTT+onSq9lVClQFZiZ64DW mOZlV/QtFfB7uwEcul58DDEvG/MVZvkbTAs1gmV2TbBMaINyCk8eC298D2HqXqlm7o53tktZj J1fQrdunxRDolZT7wUbCqaGY1/MhaQVXRKzwYpLyU0JogNrRMpyW3QBR3x1KQKUqgZOn5iyUt +AG+b/BTxOj7eGvjeHp3QITG3YUL3soVNEgZ8UqJkgJM8h0pdpMroyI0IHrTG1O/wH14MCQ35 HGA65PhExPCqFR0NvHecFiUnDYQkKmAdrGMo/jP+E2/eJt0o9MBrkJ07Ad5Te4GT0yya+1PdR icnhV699zCo9ax6YlNYjbwxnH1Cu0waH6wkB+uyRGfkszkPeOL2sgXJXdmQAN3ys/UeygsjEc f8HDdyI65WUmzaeshF4l/+KVlTFq3SXtOJzDYYiP9tDvEaJ3/0JFW6/rZPjR8IXxFWpW8t2Fo bQ7QVWxubS+WMw6FgRtzDzvrOMbs2IMp5x/R+SKgfQSt2kcRrg8kHT+0h8y7ZKQzQjQ4mOBKe 8FvEYy8/XJC/AATAlItwvGV/NcF80aaXSiEztpkHMi3btzH9D5ErGcQV9OW8daKeBWBUMGwMK 7gRL/QIhbvZQDf3tWTSnBLLQJG6tc9FmNMEzzvioAj15GRwLIFMxkfYKOmbhUJ3DJkjpX30De Qcj2euEMzPSEbVpdjZ3nd7jQgSgvH/GQCPv+OX+ia0iVrr/J708dMd5l4wqYM/l3b7iX61rMg Dxi+9DxESgVVqTkvpwviMazOwXR/CU1ogp5SA3YB3RubLXd/wE= 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: Thu, 25 Jan 2018 21:36:46 +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/keyboard/tegra-kbc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/input/keyboard/tegra-kbc.c b/drivers/input/keyboard/tegra-kbc.c index 875205f445b5..a4d6eea7aebe 100644 --- a/drivers/input/keyboard/tegra-kbc.c +++ b/drivers/input/keyboard/tegra-kbc.c @@ -622,10 +622,8 @@ static int tegra_kbc_probe(struct platform_device *pdev) match = of_match_device(tegra_kbc_of_match, &pdev->dev); kbc = devm_kzalloc(&pdev->dev, sizeof(*kbc), GFP_KERNEL); - if (!kbc) { - dev_err(&pdev->dev, "failed to alloc memory for kbc\n"); + if (!kbc) return -ENOMEM; - } kbc->dev = &pdev->dev; kbc->hw_support = match->data;