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: 10184257 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 67C6160388 for ; Thu, 25 Jan 2018 15:47:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 56AC72852E for ; Thu, 25 Jan 2018 15:47:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4A64F28788; Thu, 25 Jan 2018 15:47:17 +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=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D0FE92852E for ; Thu, 25 Jan 2018 15:47:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:References:To:From:Subject:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=acNUPwHfgELT5JSosxA/PI3nyL6ZEswJ1ud0EZHiOYE=; b=EkvyDDzXqkvQ5c SIqCuPDBkJ5vaR8aCaYbxyIhbBq682WmBrGm2wDRh+2TSOlfHysu9m9lqbcLC9MJ4fqlRQC4IkWzv 88s6JH4DqbdyenFX5l9L2G4FpIWuHm+G61UgVBoDtGhkuHIC2sXduHCPqZw/v6rJP/az3GvaJYIDI Veetwu6JhHygcFkbW5MMu0N2VlLcHn9HDViM3x6DwM62ER6HDzjKPLXOBh7hMitj93HbMwsol1YtO D0U98TqYJC7hmBD8LN8MIHkhhfnMOB+zUEPZxCIov2M9LsFUZdQvD2CkEdmY2AjeCC/p8TjAv2BoH NBwzg80hITo3nqgS8B/w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eejkA-000699-BT; Thu, 25 Jan 2018 15:47:14 +0000 Received: from mout.web.de ([212.227.15.4]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eejk7-00068W-2r for linux-arm-kernel@lists.infradead.org; Thu, 25 Jan 2018 15:47:12 +0000 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 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= X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kernel-janitors@vger.kernel.org, LKML Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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,