Received: by 10.223.176.46 with SMTP id f43csp2551702wra; Thu, 25 Jan 2018 11:36:58 -0800 (PST) X-Google-Smtp-Source: AH8x224UNqP701Q+6QXGV2NDe24gzpNGRMd1GVLKw8jRJD4sAURopAO3vPj/uFGnMKAUgXYt/u7R X-Received: by 2002:a17:902:3084:: with SMTP id v4-v6mr11231552plb.61.1516909018278; Thu, 25 Jan 2018 11:36:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516909018; cv=none; d=google.com; s=arc-20160816; b=jOh7V9xAdU3UzA2MnzRSRruJQRjoHng+uzcMQblcZcMaOTjRn1ccBtSgel8St1zpYP RVM6K/zQR5KlAISu6McyS1zTSjNe77FyUHZwWrXChyM937DLyP8+lvi+1LrtYsUjPvq8 1Hh3ipp/i3tWKoigriUp4iFPRwgbol18rbqd7roewfH20eI72x4pLOB4tDYviKpup5xz Tea8Woo1L2f5GCYUu5l4LN2yT2ceQPwWDT1P9JcjMhS94ssjR0Tl4DI4iXqSf85Ag0r6 rDGQRgLF4Zvc2PSEKFlXrbokMCYO3ZFGN47aBemMRrehYQoQQCG+5S4wnAFpeDt0lrdO pajA== 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:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:from:subject:arc-authentication-results; bh=ce7cEaOHDMXsvksMeHlS6N35dW+we8oKdrGTzFXn424=; b=aNGgHKTSWDvQ+VyfHowgyZ5MPrRC5x8OwS6jLRp0cgkL/y69TnM/btXVV+P/Fd8bEA lSh0MRSMN+kmClDtuySFhpAHaNcWetR+FHzcmxktm7dbvUbRWoOjLn7DMMohlkabVGG9 UDdJhGXbmxGNGfyqI+DD5dkyCo9M9b/aHvs4QbUp+A0EMNT+ERQ3Vb5nZzo/174Hor7o oOH8/pSfxpYCoh+4om3J/3MXxqy33jHOPYr0WJL21x6Qf68b1RxOwMlLPmiihAlACPvP wYZfzRilqaGhyJNXOFTF3oWN6E5+25dDIZzFyzG5DY51k7QPViVavzOtA6r7xzpKiLzw i/AA== 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 e89-v6si1909147plb.461.2018.01.25.11.36.43; Thu, 25 Jan 2018 11:36:58 -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 S1751385AbeAYTf2 (ORCPT + 99 others); Thu, 25 Jan 2018 14:35:28 -0500 Received: from mout.web.de ([212.227.15.3]:59885 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751171AbeAYTf0 (ORCPT ); Thu, 25 Jan 2018 14:35:26 -0500 Received: from [192.168.1.2] ([92.227.186.52]) by smtp.web.de (mrweb002 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MIvFp-1ecsQU3Oqf-002XBl; Thu, 25 Jan 2018 20:35:23 +0100 Subject: [PATCH 1/2] Input: da9063_onkey: Delete an error message for a failed memory allocation in da9063_onkey_probe() From: SF Markus Elfring To: linux-input@vger.kernel.org, support.opensource@diasemi.com, Dmitry Torokhov , Steve Twiss Cc: LKML , kernel-janitors@vger.kernel.org References: <9b0e8f6a-6386-d307-34fc-7936c52bd0c6@users.sourceforge.net> Message-ID: <77166fc3-f853-46a2-2a90-141e7a6e039b@users.sourceforge.net> Date: Thu, 25 Jan 2018 20:35:23 +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: <9b0e8f6a-6386-d307-34fc-7936c52bd0c6@users.sourceforge.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:k5IbHtIgnEd3hzy0fZK/32ENi5kl+R78hLQDbrJSBPs+D985MFQ iEkWMTU2u+4bm9LvKIrorHbcsMwjj8a0iyK9y/rV+Tdru0dTzGxv/3X8uJ41d/X4LyyRStX SqalleZhaKhN/Sks7VRfSKzk9jzU4Ed9cmIXRkRuy7rBTHz34xykkccb8rXRZMxNFb7cbj1 9yFDmtiuJG9yegmWJUBNg== X-UI-Out-Filterresults: notjunk:1;V01:K0:NLZ5/BiDDrQ=:N0dITsBX82ox4W0e+gwVTe iXYBisb7hDoUk6J89rjJF74rHF75aSYGsO7Nc+Oz+rruXQHxOaTFCNJAbDYugDon9jkgWFD9x GYZxb62QLXXHyiYJiwZEDt3GS0s1cvNrftHYUgvboxQJ1UBFc/h5N6jgs1zYwUlM8UQZj7/tt llT9x2bmGLrDUQ6fPEAMAKStKLXwrmJRtkjWly/+cct529tUyCNNMtoQtKPvyw0nv2XwKKmGx LE0SmUv3K9BHG3LSOEPetJRDBfgrWNBdv54Tu0Hj0Sj6WBpK7RbOb4frt8mXeE2o2WJ3mYJ7v FEXdX6zmKPvEtUZBMs5KDxeV6D43KWNSuG5G3kmb9G7x4HCJmNYIfvqJdDtzqM7BH662/S8rs p2XeEcds2LEn6CMoOu1UOHN578XB0lxsw+lU57FlOXAmHRoAtXBfW8qSZqBhByPpjeyUWeX7m yffm/yRHLStksMnyg8Z1I0fEe87LoPU0cW5AxdvOHN3nAYkIbO+bi1I+mpFMVeNb6ZQLFhG1p hEl8Y/Iqy7uNza9Kpnu8L0GE2r1ohGZv1tyvokKcen+101zM07HgGh5rJ2D34CRa9fLOeP6wp EbSorSGPcXh0Fq2F9GIJy9uurqNqn8PhmtOL1QNmNQZVzFi16tKvcoNsk9cE1wpz8jrM5Q+NW RRO7ZLKYXOfMY7rUatq+PVyOqZ7LpyL/RZeN6mSlBoQvPeoCBvbA1wFCkNcZ6m7yQDh2sp+5P RECiN+WkHp1ClNwl2J8wMDLH+oI3CJrkJQJ3snxeN9WbFY5a15nSe6adjfqYvmWpJtDAVD1Bn QATUzO87nC5SUkFBPG/OHW7ll9v/wo+JNLDaZgJlSjqeY78cWI= 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:22:57 +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/da9063_onkey.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/input/misc/da9063_onkey.c b/drivers/input/misc/da9063_onkey.c index 3e9c353d82ef..acf592975bef 100644 --- a/drivers/input/misc/da9063_onkey.c +++ b/drivers/input/misc/da9063_onkey.c @@ -215,10 +215,8 @@ static int da9063_onkey_probe(struct platform_device *pdev) onkey = devm_kzalloc(&pdev->dev, sizeof(struct da9063_onkey), GFP_KERNEL); - if (!onkey) { - dev_err(&pdev->dev, "Failed to allocate memory.\n"); + if (!onkey) return -ENOMEM; - } onkey->config = match->data; onkey->dev = &pdev->dev; -- 2.16.1