From patchwork Thu Jan 25 19:35:23 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: 10184737 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 84F5860388 for ; Thu, 25 Jan 2018 19:35:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 735A9201B0 for ; Thu, 25 Jan 2018 19:35:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 66B5C28AB1; Thu, 25 Jan 2018 19:35:29 +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 C60D928AAF for ; Thu, 25 Jan 2018 19:35:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751174AbeAYTf1 (ORCPT ); Thu, 25 Jan 2018 14:35:27 -0500 Received: from mout.web.de ([212.227.15.3]:59885 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751171AbeAYTf0 (ORCPT ); Thu, 25 Jan 2018 14:35:26 -0500 Received: from [192.168.1.2] ([92.227.186.52]) by smtp.web.de (mrweb002 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MIvFp-1ecsQU3Oqf-002XBl; Thu, 25 Jan 2018 20:35:23 +0100 Subject: [PATCH 1/2] Input: da9063_onkey: Delete an error message for a failed memory allocation in da9063_onkey_probe() From: SF Markus Elfring To: linux-input@vger.kernel.org, support.opensource@diasemi.com, Dmitry Torokhov , Steve Twiss Cc: LKML , kernel-janitors@vger.kernel.org References: <9b0e8f6a-6386-d307-34fc-7936c52bd0c6@users.sourceforge.net> Message-ID: <77166fc3-f853-46a2-2a90-141e7a6e039b@users.sourceforge.net> Date: Thu, 25 Jan 2018 20:35:23 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <9b0e8f6a-6386-d307-34fc-7936c52bd0c6@users.sourceforge.net> Content-Language: en-GB X-Provags-ID: V03:K0:k5IbHtIgnEd3hzy0fZK/32ENi5kl+R78hLQDbrJSBPs+D985MFQ iEkWMTU2u+4bm9LvKIrorHbcsMwjj8a0iyK9y/rV+Tdru0dTzGxv/3X8uJ41d/X4LyyRStX SqalleZhaKhN/Sks7VRfSKzk9jzU4Ed9cmIXRkRuy7rBTHz34xykkccb8rXRZMxNFb7cbj1 9yFDmtiuJG9yegmWJUBNg== X-UI-Out-Filterresults: notjunk:1; V01:K0:NLZ5/BiDDrQ=:N0dITsBX82ox4W0e+gwVTe iXYBisb7hDoUk6J89rjJF74rHF75aSYGsO7Nc+Oz+rruXQHxOaTFCNJAbDYugDon9jkgWFD9x GYZxb62QLXXHyiYJiwZEDt3GS0s1cvNrftHYUgvboxQJ1UBFc/h5N6jgs1zYwUlM8UQZj7/tt llT9x2bmGLrDUQ6fPEAMAKStKLXwrmJRtkjWly/+cct529tUyCNNMtoQtKPvyw0nv2XwKKmGx LE0SmUv3K9BHG3LSOEPetJRDBfgrWNBdv54Tu0Hj0Sj6WBpK7RbOb4frt8mXeE2o2WJ3mYJ7v FEXdX6zmKPvEtUZBMs5KDxeV6D43KWNSuG5G3kmb9G7x4HCJmNYIfvqJdDtzqM7BH662/S8rs p2XeEcds2LEn6CMoOu1UOHN578XB0lxsw+lU57FlOXAmHRoAtXBfW8qSZqBhByPpjeyUWeX7m yffm/yRHLStksMnyg8Z1I0fEe87LoPU0cW5AxdvOHN3nAYkIbO+bi1I+mpFMVeNb6ZQLFhG1p hEl8Y/Iqy7uNza9Kpnu8L0GE2r1ohGZv1tyvokKcen+101zM07HgGh5rJ2D34CRa9fLOeP6wp EbSorSGPcXh0Fq2F9GIJy9uurqNqn8PhmtOL1QNmNQZVzFi16tKvcoNsk9cE1wpz8jrM5Q+NW RRO7ZLKYXOfMY7rUatq+PVyOqZ7LpyL/RZeN6mSlBoQvPeoCBvbA1wFCkNcZ6m7yQDh2sp+5P RECiN+WkHp1ClNwl2J8wMDLH+oI3CJrkJQJ3snxeN9WbFY5a15nSe6adjfqYvmWpJtDAVD1Bn QATUzO87nC5SUkFBPG/OHW7ll9v/wo+JNLDaZgJlSjqeY78cWI= 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 20:22:57 +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/misc/da9063_onkey.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/input/misc/da9063_onkey.c b/drivers/input/misc/da9063_onkey.c index 3e9c353d82ef..acf592975bef 100644 --- a/drivers/input/misc/da9063_onkey.c +++ b/drivers/input/misc/da9063_onkey.c @@ -215,10 +215,8 @@ static int da9063_onkey_probe(struct platform_device *pdev) onkey = devm_kzalloc(&pdev->dev, sizeof(struct da9063_onkey), GFP_KERNEL); - if (!onkey) { - dev_err(&pdev->dev, "Failed to allocate memory.\n"); + if (!onkey) return -ENOMEM; - } onkey->config = match->data; onkey->dev = &pdev->dev;