From patchwork Thu Jan 25 19:51:36 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: 10184755 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 2FCF060383 for ; Thu, 25 Jan 2018 19:51:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1C88B28B10 for ; Thu, 25 Jan 2018 19:51:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0C9C828B12; Thu, 25 Jan 2018 19:51:43 +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 9B82628B10 for ; Thu, 25 Jan 2018 19:51:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751249AbeAYTvl (ORCPT ); Thu, 25 Jan 2018 14:51:41 -0500 Received: from mout.web.de ([212.227.15.3]:57841 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751204AbeAYTvk (ORCPT ); Thu, 25 Jan 2018 14:51:40 -0500 Received: from [192.168.1.2] ([92.227.186.52]) by smtp.web.de (mrweb001 [213.165.67.108]) with ESMTPSA (Nemesis) id 0LiUVY-1fD2Rh2pWG-00clSW; Thu, 25 Jan 2018 20:51:37 +0100 To: linux-input@vger.kernel.org, support.opensource@diasemi.com, Dmitry Torokhov Cc: LKML , kernel-janitors@vger.kernel.org From: SF Markus Elfring Subject: [PATCH] Input: da9055_onkey: Delete an error message for a failed memory allocation in da9055_onkey_probe() Message-ID: <5bf10e75-db2a-086b-a1b2-8fcbd7aabbdd@users.sourceforge.net> Date: Thu, 25 Jan 2018 20:51:36 +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:+sGsSXuc5QhUz8FJbibtEjREUqCGkcSH8eMM1h1YwYZeD3H7LQO uEHBMXpBxNqnf+uee6LSB05j32x8FS9SRHWZ8HC3FxgJ4icVUIhORkrk2aVEqKmRvzzFSOH PZqNnBcl6PUOk1j2ZQotbzx+U+laOBx8PxGOj0DHByDCg5Vzz6XBq0pFFY+DhK4mTOtSzRF W5Wrdd/ywIFRMqQ/D4w2g== X-UI-Out-Filterresults: notjunk:1; V01:K0:3ORMJuy9DkM=:ohStUaYMuc0zjrLTj2Ivaj Tu6EkxUQlLK4O5fS0svEcX/sDqjHz0J2Z7OOveGeG3WIzUx4fmLUMeobVsxsKIieIqZKm+zxz v7S4njatbe+sviIuL7tUaKYFlcl+lpqAN/91s4qgMSb1jVvV+Yd46jOM2D9wPZxrHG2/8JcKQ CR//YZYfzCwGBlz2iLoRWmYvgXMlON9N7An6FsRyJDzEoovge2P+J2QRHRgzBqE0WsYgiMtb7 ErBdqlC8tDJLirZZCwsSQMbruz+XzKmLons+B3Yk+STDscibaZHPI/a0ohQNNfd5FU9vpvl9L jSIhNsW+2YSGyS9W6GTKknw5jnFsBHdYWIJ3O0gMrOuy5naUzWctPzAVSLucoQeQmUX6Jw2KZ vKoB7mo5h1jstceC1iPSCzfCeCoz1fWEokY7nOnuDflvQ+JBKHvEBUfwjS6wDNYBxYRxIym5N jME6gubRk/NP2duIEz0hzeeEi+nsAg/kOAv6XWF0u1O+tNP8wFOMp2SCI4jOAyBqAHOqShxcM pUzNsflgbQaKz2EgGDFJOnRkpC7mguqasPa98jyivdbZz/pIM3CckM2K56X5MGAJcVMX+z9Q/ daSDeXqS8uCvivA9ZJ4wyGivJtcWR6gWIOU5nLCTnb2BXNoQbZHmvk2wff8heEFaOc1N7IDJM vV3hzLS0a0sM/WSt152KZbqtOOLMLBSobaOBMS6xpo+gsIvFTTSfD71kEM8y69WfWsjF/SNRd CphBge0YQCQi8aEJxoXE2sfKJvOdy4DASHHbYvcWYxV44WjZ02U/0PxYtyhBG5c/BZJO/j7cz 45jTfG4c5W2CF2AWueUuFvO4h6Z+rv6UfPtUJAXsZlGlFwZ7Mc= 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:47:03 +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/da9055_onkey.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/input/misc/da9055_onkey.c b/drivers/input/misc/da9055_onkey.c index 3251a9693f45..eabddb226998 100644 --- a/drivers/input/misc/da9055_onkey.c +++ b/drivers/input/misc/da9055_onkey.c @@ -87,10 +87,8 @@ static int da9055_onkey_probe(struct platform_device *pdev) } onkey = devm_kzalloc(&pdev->dev, sizeof(*onkey), GFP_KERNEL); - if (!onkey) { - dev_err(&pdev->dev, "Failed to allocate memory\n"); + if (!onkey) return -ENOMEM; - } input_dev = input_allocate_device(); if (!input_dev) {