From patchwork Wed Jan 24 17:39:10 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: 10182895 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 A6F77601D5 for ; Wed, 24 Jan 2018 17:39:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8DEC028845 for ; Wed, 24 Jan 2018 17:39:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 807AD2894F; Wed, 24 Jan 2018 17:39:16 +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 0EFFD28845 for ; Wed, 24 Jan 2018 17:39:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964850AbeAXRjO (ORCPT ); Wed, 24 Jan 2018 12:39:14 -0500 Received: from mout.web.de ([212.227.15.3]:65500 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964840AbeAXRjN (ORCPT ); Wed, 24 Jan 2018 12:39:13 -0500 Received: from [192.168.1.2] ([77.181.242.198]) by smtp.web.de (mrweb002 [213.165.67.108]) with ESMTPSA (Nemesis) id 0LuMAJ-1eoxAm21Wp-011jgi; Wed, 24 Jan 2018 18:39:11 +0100 Subject: [PATCH 1/2] Input: arc_ps2: Delete an error message for a failed memory allocation in arc_ps2_probe() From: SF Markus Elfring To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: LKML , kernel-janitors@vger.kernel.org References: Message-ID: Date: Wed, 24 Jan 2018 18:39:10 +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: Content-Language: en-GB X-Provags-ID: V03:K0:8oTo22gv4kDBRcsn5Ml8Z4e7HQOceEmEpQIFgdjzS+yhRd3G9JB RTR8drIP3+1Zd5b8hX1GWRg3BC/4cOi2N99wooVe+KOrStCItusRVey/Oqj4IcTXtmDD7gO /QMehFrRv8bIvgmpoZH67oi1b5gT3hhvrNaJPkL3EhktKpejWFCJvpQJjk5LrlB3gj3UPp/ uU5pvHIe1LndwqgsFa9gw== X-UI-Out-Filterresults: notjunk:1; V01:K0:RKCNmYdMHus=:7nSdDN3ZuXMhjmO5dzZ1W5 fAHv1QJ5r5DM+8eWqvLVOjP3bJakRxuFA0A1e28Stn500NSVErzoF+DvHAQu4njDUQomOPmk0 Ll8kMiBGPT2L8yvCYSfeChMpCXe/+WDw0VBS5Zi1dCldce+vB5+YcbOmzD54Ab0zx+WB8Er68 9ZD4mOakUS/cqDoY954iqOazHnFxacNsIvFYrf5Uk20QJFFpVLLOOTiC5916pjKXtry+qlijs ujniyeV3owUo9gDgggGLPkrlXCcbKoohfaDayg085+YLSUf13mg0uI8BXNCZlMNIR78SdzG9E RMYtFzQLGQ1O5b9mGPya8TxeWShAjeoy2yGiqH56fZsVj27Ux53QhPkV3dQ3fO2EB5jbdA8K2 eI5AGkcwZJMVW7xaET1/L05ZoMXVOPfrgl6HqZ7N6BzDXA4G8Jxvx/CMMWQS4tKN7srx/MYIe mXnQS4js/Dp5HtzqrRIpmZbcF5iRXJO75NDi3s87t2XsnIOh4t22MNGc8H6o8sDc5/ma0zaaA ULikKk37r1Si5GsGiiOSHATlBALjbHQ7Ynri9oniqmj2DqpQY+HywTnvGP/8SYLbmsBNXFEft OmD7WnmNwhawrgLLblzWkazC0ifLRFbp9j3tRpBjOfrEAjAII99Yhikfvv7hQtNyPgDQtCZDu T2CsFwq2/byVhCZonj6tIBRHttefUFFpnAjKajy3+hUDg7/troz2b5KIOtzIsKycfO8aaJPys Vwetbbap5QStEoC8Sccs7+QLpJijVeaSB/2P2QzvCrBXQc4PtknDZCMN3H/3SyHXaVxLs88Ft Ydxdic4Vh8xmRxeEmCkJr+9PXdhqUTwvUY5uCvCtC1OfPUdCw8= 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 18:17:32 +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/arc_ps2.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/input/serio/arc_ps2.c b/drivers/input/serio/arc_ps2.c index 99e57a418753..9860b1c1e67a 100644 --- a/drivers/input/serio/arc_ps2.c +++ b/drivers/input/serio/arc_ps2.c @@ -197,10 +197,8 @@ static int arc_ps2_probe(struct platform_device *pdev) arc_ps2 = devm_kzalloc(&pdev->dev, sizeof(struct arc_ps2_data), GFP_KERNEL); - if (!arc_ps2) { - dev_err(&pdev->dev, "out of memory\n"); + if (!arc_ps2) return -ENOMEM; - } res = platform_get_resource(pdev, IORESOURCE_MEM, 0); arc_ps2->addr = devm_ioremap_resource(&pdev->dev, res);