From patchwork Thu Jan 25 15:46:56 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: 10184261 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 2ADBE60388 for ; Thu, 25 Jan 2018 15:47:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1A4662852E for ; Thu, 25 Jan 2018 15:47:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0D9A9286D1; Thu, 25 Jan 2018 15:47:32 +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 A82A32852E for ; Thu, 25 Jan 2018 15:47:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751138AbeAYPrR (ORCPT ); Thu, 25 Jan 2018 10:47:17 -0500 Received: from mout.web.de ([212.227.15.4]:62731 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750980AbeAYPrQ (ORCPT ); Thu, 25 Jan 2018 10:47:16 -0500 Received: from [192.168.1.2] ([92.227.186.52]) by smtp.web.de (mrweb002 [213.165.67.108]) with ESMTPSA (Nemesis) id 0LhvYQ-1f9tPk2NUY-00n5UX; Thu, 25 Jan 2018 16:46:58 +0100 Subject: [PATCH 1/2] Input: sirfsoc-onkey: Delete an error message for a failed memory allocation in sirfsoc_pwrc_probe() From: SF Markus Elfring To: linux-input@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Barry Song , Dmitry Torokhov Cc: LKML , kernel-janitors@vger.kernel.org References: Message-ID: <00544fed-52b0-0536-ad4e-f023668f08dd@users.sourceforge.net> Date: Thu, 25 Jan 2018 16:46:56 +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: Content-Language: en-GB X-Provags-ID: V03:K0:pXgNnQVwqIDzFKmHpBgnuYXmgqgv3XERwdhKLc25Iy8mlnrylx+ mW2cDI9CXfGkEZCtKh5dy6VulGd098m2phHaY8EZODgnZOggQJNylGp/1qR/Fm0f8dfXKfc s1+VR27zdrjHu1sktkN6EveKv+5l7rTwqofWHjniFFNCZOzK3eFtu27RUpk+eHfzWbFSp7u 5dmEL8Tu0vZsnzwo6VXsg== X-UI-Out-Filterresults: notjunk:1; V01:K0:dB9o0VU/ckw=:GxbH3AfLBssQCbfN9XWzk4 IZqTxJAFwDdYnNnESInGhTOUiiEZNTXPtOsnWL0yaVoY1ouFLnp2BSGFiH9MQbG3vWMD9BZba JCTfONIwliR1WFf808YlrGQ3ce9agB4GTCCta9WqDVo2zG7HcplzG/ferbRMDgzVRdH3zzbFB R/b/fOjHAC/gwW3aoHseFK9TR6EDbIZb9FcWhjlIJc3WBS62NwWUMy9p68RUBLQtO8nbKUwHr wWVygtSluGspQXsrKYOfvcN1ECvpSUJMARAxYAP1++OQ6hu1KOYrnx+LAcNwhvONHRqtqZrnj ATnbcheMmIBC/so4SbF47LVJWYe46XtwJjB1/D2QGVy21g8tjRzMpPxkpihrLPxdP7VK62L5G qLuMDJmCIRbAXSy4ihc2qt5kCL1mFw+OIJYLlh1xuHshXi+LGa4Oeh3MOT+8yQKdsNMMeYVZ8 7cOtEp5fYwyjTC9637oGTDou5YqTV36R7twU77wDIlaKF70R8kPeeLMNszwkM0qUOl/Ch4tz4 T2q7LCDeftBETIE4Niil/Q8ZAYerQdpvSbo8c4oY5NNKUbUCX9/KH+X0/Gkkxq1ij235PRTwf suFEZd5hk25D5/aDRI53ZbpYq4cIBZhridkt04WxPRuHM4yC9fvveHKRbfjla2bQ2xlVllXYp 8bwvi4hJ/6Ma1sM7aIYaHsReee45ZziM2gN7C8GBPVRToEwliZH1issXESff9sr9rK7uuv0kr vrol93nHVpq3fNVPnEVTqwoDtPC5hkbNg8ARI5lUlchsS6IwW3wVKsiq0B+Wv7QhQCqrnvNy2 XSH6wiRYAWA6zh0+36s0r0fIVqq9e1IZUIyR2QlxW9bric5FY0= 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 16:32:09 +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/sirfsoc-onkey.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/input/misc/sirfsoc-onkey.c b/drivers/input/misc/sirfsoc-onkey.c index 4fd038d476a3..9d8b4e2d7063 100644 --- a/drivers/input/misc/sirfsoc-onkey.c +++ b/drivers/input/misc/sirfsoc-onkey.c @@ -113,10 +113,8 @@ static int sirfsoc_pwrc_probe(struct platform_device *pdev) pwrcdrv = devm_kzalloc(&pdev->dev, sizeof(struct sirfsoc_pwrc_drvdata), GFP_KERNEL); - if (!pwrcdrv) { - dev_info(&pdev->dev, "Not enough memory for the device data\n"); + if (!pwrcdrv) return -ENOMEM; - } /* * We can't use of_iomap because pwrc is not mapped in memory,