From patchwork Thu Jan 25 20:52:05 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: 10184795 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 87D6460233 for ; Thu, 25 Jan 2018 20:52:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6B40428A97 for ; Thu, 25 Jan 2018 20:52:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5F85C28A9E; Thu, 25 Jan 2018 20:52:22 +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 0A06C28A97 for ; Thu, 25 Jan 2018 20:52:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751196AbeAYUwU (ORCPT ); Thu, 25 Jan 2018 15:52:20 -0500 Received: from mout.web.de ([212.227.15.4]:58103 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751138AbeAYUwT (ORCPT ); Thu, 25 Jan 2018 15:52:19 -0500 Received: from [192.168.1.2] ([92.227.186.52]) by smtp.web.de (mrweb002 [213.165.67.108]) with ESMTPSA (Nemesis) id 0LZet2-1f4IRA1iX6-00lSvv; Thu, 25 Jan 2018 21:52:16 +0100 To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: LKML , kernel-janitors@vger.kernel.org From: SF Markus Elfring Subject: [PATCH] Input: spear-keyboard: Delete an error message for a failed memory allocation in spear_kbd_probe() Message-ID: <57b7b09c-1f32-8f0b-cc1c-135e1ef211ed@users.sourceforge.net> Date: Thu, 25 Jan 2018 21:52:05 +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:Yiqa3FFNBllnrUOLFHEWhRWCS9rGGoRdPQ1zW1vz/ieXRsnv5H9 BkSNpFiaWkotMscPU7OV5p36viUYG2NqIw3sZT3OCTmTUwczfoHIvW1xRlEPK6yIdmFtjEh FqKx+kKRQfa1WbCdOO63aoVBV1MgjMFWEJ3Roor9GJxl/KSawhFuX5k75nnmyoV/cOuQYLU 7U48oJ9VpqjP3otpiTirA== X-UI-Out-Filterresults: notjunk:1; V01:K0:DJHML/Jb31Y=:SRUmyUgYtDNNApFguaQbXe 7rMrCg//k2P/Km9r/FkT7HojGvdY4fC7X9THeLnwQ/IQB6/nQBmw7okakEAkwAokxpR4zu9Nh hNMD7rN75RYsACk7O/JHj7kWNcQMuQDeYz5vqlpQf1n9cGwDWyM1LXz4A7zetvWaxasUg/ehU ymSYJ9HhAzSHqv4V+40QrjuDfZPA0CjNeZc14NVedUmxqHa9LLa/StFQ+p7LEa9xc012INTcD StqFN9IfiXooHRtWNf3KcMdfc84T1gc3c7KyTT2AiP7FoHlw78hlUMUVO5CWYQCG6AxSNjU/Y TE3wa+ROP8YzBS3b4SURFxKnPTLy10/Q/Hyu2mL7Qla9rP8CToWmXoHVNwz+ha5NcTC+3WUK2 e1INl+FjeUhAcgE5I9FBe8xiKljDhgiKLwE25YrB/v+RLhcwt/w829xgzRFFM1g/Q8Jlh2TqB bl4+fcpm9HfejPe7F9HDGSc67XpLcHG9UvhfGMHeDLhpOpv4BDPdfPGnA5gRCuoPCuCm03hyV Tsvj04RaKJ91jonCaAbcrVNzbj5OrFJuH6s4zgezbDnVWrn7w5VYlNuElWXuQbXYBYeNMLltm +8I46PmH2kFZmgIJev+J0xP7zwE3HhcM5O8tUgl3GSAMnbRCkbutYjvFWKL7bo+b+gvSpmtAy J5VAm9geyaFPTHRx60WOqHIx7tvPBWAwm3lec+A2Zzqm23NXWgx7vo26+38IpqWjMFwxYN1Jw k+C644tHWQK1z3tQBVo1OP9nsNDToQK+01KbJRibWgCbNm9Z69xeOd8mF0S1id4sh+k9o5n5K DUtanCsf/QldBiWvzCQibQBk/tmfXEA8PTcZc1vZdgbvLWGBtQ= 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:49:13 +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/spear-keyboard.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/input/keyboard/spear-keyboard.c b/drivers/input/keyboard/spear-keyboard.c index 7d25fa338ab4..1386440a870d 100644 --- a/drivers/input/keyboard/spear-keyboard.c +++ b/drivers/input/keyboard/spear-keyboard.c @@ -197,10 +197,8 @@ static int spear_kbd_probe(struct platform_device *pdev) } kbd = devm_kzalloc(&pdev->dev, sizeof(*kbd), GFP_KERNEL); - if (!kbd) { - dev_err(&pdev->dev, "not enough memory for driver data\n"); + if (!kbd) return -ENOMEM; - } input_dev = devm_input_allocate_device(&pdev->dev); if (!input_dev) {