Received: by 10.223.176.5 with SMTP id f5csp606192wra; Sat, 27 Jan 2018 06:21:14 -0800 (PST) X-Google-Smtp-Source: AH8x227lXUPbJ2SaUavY6tNzHj7SQcJ7KDEtPXfrk/5hcCxZP2yy4/YMprQ8Tj/ptJmV5++SCXEC X-Received: by 2002:a17:902:b288:: with SMTP id u8-v6mr16143775plr.291.1517062874834; Sat, 27 Jan 2018 06:21:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517062874; cv=none; d=google.com; s=arc-20160816; b=fUNAG1ROT87sfhf6fIPa5aw/FIQ9M2HIxacgr/CIy0IkFpVSaZMOfVRcjg9gG7KKgt HiyfpwBQ7mWOfWp9XiUOkHgFfCzA829uZObBlcFGLVLx05jAikcDOrSdkJbaPz2+QZXH gaC8q4MknWBa7IPPb9yCxU83tHuY2usIMtq0hFr8vyArEok6jojN8fBy7GdB5wI9k2mY cOh61IUnvsY9EOZUI45XwUETZ47zS5hKorZpWuimlOAIbB9fqW2AORcpojPxsNxK1dXJ NPpHvC2/ZrmJE4v9E4VQchtVu7kIfnq0sQNQpEIjCjHYC/HzF96IRaqXYkkZfuC3pDvO 4wNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:mime-version:user-agent:date:message-id:subject :from:cc:to:arc-authentication-results; bh=ENBMhTiTb3GjC1kfoh13RS2Wpe1H1j1jQuH5Z00XaIw=; b=oCunYlthZ36fzzwklB4Hud1pI9ZaOgx9KWj1RQsKJ+Mo0ZkINPnJQt27MURS05vtwI VzAFyNiHRdp1ruTue+Px/rQdWFFrZ/2CVQfkS1AfO9Rc4KpMV9aKSYAKVKMv1/o9bZ/R k9TBYcpMW5/I5qHPWDaPFZuy0+O4RRCNhZfwxT25Lv9H5eImrHHj5zrtEF6MpXbPrujn gBHw/MGw/aPwPuJ54rGTYaG/lRSqWtjDcT8tGDzAB3t0kJdNAoHSM13wPdrouu0/hLRZ A9POQjcM+z1KtbfY3H2hCWPpuzA3t0pMWDaJ0GlvEwM0AJwn6AgY3Ihbt3Va6lqZb66Q rrXQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=sourceforge.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j3-v6si5399788plk.506.2018.01.27.06.20.59; Sat, 27 Jan 2018 06:21:14 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=sourceforge.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752881AbeA0OUe (ORCPT + 99 others); Sat, 27 Jan 2018 09:20:34 -0500 Received: from mout.web.de ([212.227.17.12]:60109 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751902AbeA0OUc (ORCPT ); Sat, 27 Jan 2018 09:20:32 -0500 Received: from [192.168.1.2] ([78.49.117.84]) by smtp.web.de (mrweb102 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MHY1o-1ec8UH3tcK-003PFg; Sat, 27 Jan 2018 15:20:26 +0100 To: linux-input@vger.kernel.org, Dmitry Torokhov , Michael Hennerich Cc: LKML , kernel-janitors@vger.kernel.org From: SF Markus Elfring Subject: [PATCH] Input: adp5520-keys: Delete an error message for a failed memory allocation in adp5520_keys_probe() Message-ID: <9d0729d2-59ab-f116-aa12-0457ebde0041@users.sourceforge.net> Date: Sat, 27 Jan 2018 15:20:25 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:ksc1Kno3k2wt7UI1ec5Rf7taFR1upCriMoA4sCc2eDvUA1J5BuM XeEg9QkDk550DyKgRomU99/szd4WAjdtUcbqYxn94zXoOWpcv5/FWQ4whPqf5bwVYue1TzB Bvh5UEl0PjLPLH5/DinXFccpsCEZPowwJeVCIG6ZOt4P1MB+ayUqZxQbxDIVMs8/xuf1W5n UkYBM8vI/Yn8ha/ONkhEA== X-UI-Out-Filterresults: notjunk:1;V01:K0:n4hKHJeCb38=:14YRYmA9D91haNRPCVetpK qEXx9uYsvbZjXdtrW3SjolqyuC2Po4s6RdNJM86quLldnmBwMtbCu6F178F4+ey6nNP7ygKac 68gULKhlK0wZl5/+CNx0HJnJ+keQH6ck2x0rHry3KLOLcQIPdvBa9dePq3T9/22ojfmO0rtBN Eu1pjh1Vn5NwcbaGc38uweE6te7uku1ShdPAH2K2iblksY0MolbhbXWhfSrHEx/oIKCXCNKiW 2kuf1EQsDm9KBwlIEctu8x+GoFanxeAecaVJBRnr+rT+841yG8GcF7Q0EyZpf0FBjvKWrq12Y XGsJON10JVQD8tqzrMCYSJiGy6NUuLyRGUza+KP0F5r/MqSKTW2tR3gTUkZjsiSrZGBPsY8mg LspREyRpAUbwC9UzgVZ4KNgqW5nOG8nwenPt35gx9F4DcYVSSdFI36TnF5u8H0KHeyC2LhO1w NWPvNqXKDtfz/vqOInrFX9k6elBT7PkccxKFGMxphKEz+QovfV4yh/OouQVql2+OHdquahV8w FWiKuo6NdBGF4XXJeNTpWZIvLi9V52L5W0aCEOiMF3KacPSucTAMIdqRWBqROA9JPnIYAeXVp tr6S+ni/k4MOVWiQfppMN+6ve8ubIGLaOgKALM5GNPnxncqe+bYwKV3Htbi/RWuYp3HI64zxT x8xmuOKsXnV7GTPz9v7HvzkakOPngwm7exkAHxLi33NukbOulzqpKpQOhGCQD+XWxHkCmrCRK qnX5W/ey7mJ3VSdyvu4mZgtsY9q8Cc9d4Qh4oOnpxX7pykbgl919cnWEPJw2y1klbo8Sj5QQr 2KntLi/AT2DToU17n41LbF0OCYx6/rsasoeh8MV/orVsyA+Lfs= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Markus Elfring Date: Sat, 27 Jan 2018 15:15:52 +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/keyboard/adp5520-keys.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/input/keyboard/adp5520-keys.c b/drivers/input/keyboard/adp5520-keys.c index f0b9b37bde58..72e01cb77881 100644 --- a/drivers/input/keyboard/adp5520-keys.c +++ b/drivers/input/keyboard/adp5520-keys.c @@ -91,10 +91,8 @@ static int adp5520_keys_probe(struct platform_device *pdev) return -EINVAL; dev = devm_kzalloc(&pdev->dev, sizeof(*dev), GFP_KERNEL); - if (!dev) { - dev_err(&pdev->dev, "failed to alloc memory\n"); + if (!dev) return -ENOMEM; - } input = devm_input_allocate_device(&pdev->dev); if (!input) -- 2.16.1