From patchwork Wed Jan 24 16:34:51 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: 10182847 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 2CD9D60567 for ; Wed, 24 Jan 2018 16:39:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1E2882896B for ; Wed, 24 Jan 2018 16:39:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 133762896F; Wed, 24 Jan 2018 16:39:02 +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 AF64E2896E for ; Wed, 24 Jan 2018 16:39:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964871AbeAXQe5 (ORCPT ); Wed, 24 Jan 2018 11:34:57 -0500 Received: from mout.web.de ([212.227.15.3]:61630 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964855AbeAXQey (ORCPT ); Wed, 24 Jan 2018 11:34:54 -0500 Received: from [192.168.1.2] ([77.181.242.198]) by smtp.web.de (mrweb001 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MdLcJ-1eNgND1GbL-00ITuc; Wed, 24 Jan 2018 17:34:52 +0100 Subject: [PATCH 1/3] Input: apbps2: Delete an error message for a failed memory allocation in apbps2_of_probe() From: SF Markus Elfring To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: LKML , kernel-janitors@vger.kernel.org References: <50013a33-b7ca-fce1-9769-bfe3db850a8a@users.sourceforge.net> Message-ID: Date: Wed, 24 Jan 2018 17:34:51 +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: <50013a33-b7ca-fce1-9769-bfe3db850a8a@users.sourceforge.net> Content-Language: en-GB X-Provags-ID: V03:K0:SC8qfQahCTQIUJRv2iO+vrF87DCntQtzRhvdl+DIZWJl7QkX8zH 3MM7DGzzUCh1MEF7NyNgqgXkDYq2BJ8OC+nY1hQzUKcDBv4qey/HPH3ujsnFLeY3x39t6OQ hkmM8+A/Una8Q11i8VRsyDhfXU+K1yAJS83oQmzvvQVBvtHcPWrb131uXjtsMdnLJeUwZ1E sx0o5gN/a6Ikto36WfZ7Q== X-UI-Out-Filterresults: notjunk:1; V01:K0:TTkCPDEYaqY=:WkT6g6peS5DQ4ZhjeWZf5e 3M3P5EiZmDjLvMFq9rt8EJn+eG9UXua+G6ZJPo7yM+xg4OgtfYQOm+3P5nO0mz+ffyOF+PPks /p1xB/YCHmovEYSFJS377B/bgAcbdDAAqJB4jTqLpl3fblE3qKI3GYmXmLVTy3YoOw20kM2Pi +t5HzZsY5HqpYRTqMmBDHXFHB6zaUy9D6d7ep3jzXBomSWG4icl/ind27B+7Cky/qqBD8APo+ tpFbdJtxbXKu0RbtgmqL6OgZNfobH9NY1BuWIRKuO1zVXMyYOL1thb15ga0GPkc9RFOqgVkhK i0bihdwu/J87g0fKAxuZkAhUi+V02B6dsIniYsFvlZ4LORhKLZHW44lGGb6e97+zyi/TglYIq 0W0/qbySLHmUJfaLWDX+DiJtFNHTMmIUi73EP6HDbgPh1MLOUnVx/wuJIHRwki1g5TbGtzyGk AtJaqi5zYiUSrIQ36jESOwuwv8HAOZvyI8mEpwqghZTvnr5S+Hm+bfApFggtjRdsxLoxkTawc lgqP288uLmY4M7lQPXyfcjtCdYTJlEhTF8WxHGiqWvIEl1VIIEHpUW4yEwwLztT98B7sOkBaO jdhJK72IQYviZ5BFxVs3VxhCy0VuFmdzr7KG9nLtsZ/6CAL+bTwOeTzMKwuZC1xPsrcZRzuOY v9VX2K0eMPoZt+Lkq0LrIyYrkjZRiigmT+7NIICKJHWje7toUFbj/SdcstRrT36TZo3OO4kNw ZM7UTJ8Np9r4hhVqmb/i7CPm66dNki5ZUlTa6Fa5fNxPZ8Zx/IqU207SsjVLzkOyJI6R9pRqy Dk98TPJHqt6zqhoHPjofGfNx2q9tGk3GSW3O/gXif/jgHjNiPs= 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: Wed, 24 Jan 2018 16:43:04 +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/serio/apbps2.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/input/serio/apbps2.c b/drivers/input/serio/apbps2.c index 45d4e08ca4f8..9b75c4e1bc13 100644 --- a/drivers/input/serio/apbps2.c +++ b/drivers/input/serio/apbps2.c @@ -140,10 +140,8 @@ static int apbps2_of_probe(struct platform_device *ofdev) struct resource *res; priv = devm_kzalloc(&ofdev->dev, sizeof(*priv), GFP_KERNEL); - if (!priv) { - dev_err(&ofdev->dev, "memory allocation failed\n"); + if (!priv) return -ENOMEM; - } /* Find Device Address */ res = platform_get_resource(ofdev, IORESOURCE_MEM, 0);