Received: by 10.223.176.46 with SMTP id f43csp2566360wra; Thu, 25 Jan 2018 11:52:24 -0800 (PST) X-Google-Smtp-Source: AH8x226dyymSSW90d61uk4+WTWWU45sco0JsP99SJx6bcBBskQuZ6VmVUADC/IKp3yglOTPxIILr X-Received: by 2002:a17:902:7c86:: with SMTP id y6-v6mr2909876pll.24.1516909944160; Thu, 25 Jan 2018 11:52:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516909944; cv=none; d=google.com; s=arc-20160816; b=qI4REr4pEovHlVqA6I5/9nSlnDtfmT22Vh7yu8eYMt8Hyqcu0HuvgXUxM5Bj6SneMD oeN7jYgOB3RrBQ0HTqNw73pWdpc8j8fjbYQlRrbZvboHEIEIGo95UEYMCGs3QKHVkrX3 g+rTxi1wEGwv6N2TGS26ntWEIaHifz6rfhkCOlDRJnAK1ly1iFhHGKyQyRUVS3IAN3iJ 9iMt+Q4c6Fip5SpxEceZix6yv2YuxsZUlHsL1/KcCMowCtWpwj+4s3s6CGEZvCA3RCWc G0enpYK91S18sJfmctOAUXuFD21A74Q7cvapuhQql+t730zhsmBvyTNNf0Ow61nsJlhO G/qA== 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=ASw5hc710B8fqI1Y7aIAPnkL686ry/fYLSH587XlSaA=; b=eEQOFaAL+JBvhd5cKbs6QkmEejhfL5x4VIr6HSEhrynXAHEgv+i4NI80YMHjsBi4TV dxhrLzgM3xXsAKYqcKcvaOy0aSPeptqfhIghwqau5mj8pGxXkL/jT1BVFC8Vvsq8+x75 zIoU2RHxOyyLUfyIEAT+wbowTpd3+yr8Zdy0uOnUUmCduETg3ADdQdWlDBPVlOVPScqa t/xu5wwnEkoRPWMa1z+y20tFfg2b2L6tE3BkSNQKFi7pPxB/i/Px6stk9HDKNJ8mFizS xX8xzwesp094WWxlsQ5NC4A5N5D9beylmdoxx4zGhzF05rNOzrHiJDGmDgtQBJ872kjV t+3Q== 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 q90si5105473pfa.91.2018.01.25.11.52.09; Thu, 25 Jan 2018 11:52:24 -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 S1751349AbeAYTvm (ORCPT + 99 others); Thu, 25 Jan 2018 14:51:42 -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-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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) { -- 2.16.1