Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753065AbeANVGf (ORCPT + 1 other); Sun, 14 Jan 2018 16:06:35 -0500 Received: from mout.web.de ([217.72.192.78]:57552 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752192AbeANVGd (ORCPT ); Sun, 14 Jan 2018 16:06:33 -0500 To: kernel-janitors@vger.kernel.org, Lee Jones Cc: LKML From: SF Markus Elfring Subject: [PATCH] mfd/htc-i2cpld: Delete an error message for a failed memory allocation in htcpld_setup_chips() Message-ID: Date: Sun, 14 Jan 2018 22:06:30 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:bQ60saadXkDs6nirYyrfBk0aOmo55hzTHeAkN8+cf8XT3+YvfVg Pr5iq/ddhjtM6EtSqIla65hzoFzrMV0x0291hOzlDVyYlfNOMyb/HP5E3hSNNhQ77ALbhZ/ DpIuD8VmE0Xi6NkevvhQtIIVNTYk+BawHKWagvhSGYAGXD7K3QeyFw65diqBO34L137iJNU blRijduvJP72xY9JLQKHQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:2ONRcnXaFAA=:+a5v8sLukPLBK7jIShhDTM fNMSXF+u7yC1xcID0MoGfboA8UXu+NOq2N1+Gw7a4JRKW9rt1FhjcvlliCooCSz+q3I4vdtjG DyoRy292w5dxnfBL83rbE0at4jCcgdjaqm8T6i7F7Xd1NBMS5OCDdBMkWC8x/Jbv4ZzRNCpDG z7nZU37p0PRHz12dHozQbj3OKFwxK2ZbduBee0vlQefw2qKadaxHQyGcPgfInTK5WgtHjWGL3 mwnexutKlDdb5zWwnHmQWt6O5q7cLi5c0d1vQU9n3a24Cf8YeNt/k3OQZReRB7gvvwAHNwT27 9fTYYqOErLZ4orBDtJkLjGIngGunwMNPr89X1DqI1ivjIz1wpAzXSBpads+78evAWQhyYYxX6 y5YyBa2NaqwX/eEem3LTGIsp4/hCX3kT+L40HNFLXlZSVVRwoOThDEAl20OD2TuPy4HszAw+w kSPWQZe5YPesE2Vcxujsb8aUX/4sIXgDtvEWzkgXn4EkFJ65XqMZWpzM6mtP8fSBB6b9phT/9 VO93upuVyzQ52BKSrbU9igSTfznA2M3mH4qEZNTZyPBDHLWss+rg8dJNQPHZeaRriML1FM1jk 2bgr6P5shKO/I0FDIbfE1AxKeHRMIii/SDRHZBXN1tGmFLNnSf+QmcUA0xWp932KtBt6WUTAb C31ZeU/tWb3y4qcNKf+0ltBMFB4e5ic4Z7cm1FeErzmFLOlm4COPUEQMnRPfsEh7miLFG2RaF aM7cMWRCgz7Jc4XkTImJ7vaePMx3VNJLJ9R4eSeTvuD+BfM70HFa1/c377xkeo79e1Eo7fctb bUTtmXb7g6E949dYg1crEzU3c+/LRXymkJeOM4YJdzjc0miJRo= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: From: Markus Elfring Date: Sun, 14 Jan 2018 22:02:16 +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/mfd/htc-i2cpld.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mfd/htc-i2cpld.c b/drivers/mfd/htc-i2cpld.c index 3f9eee5f8fb9..4bf8b7781c77 100644 --- a/drivers/mfd/htc-i2cpld.c +++ b/drivers/mfd/htc-i2cpld.c @@ -479,10 +479,8 @@ static int htcpld_setup_chips(struct platform_device *pdev) htcpld->nchips = pdata->num_chip; htcpld->chip = devm_kzalloc(dev, sizeof(struct htcpld_chip) * htcpld->nchips, GFP_KERNEL); - if (!htcpld->chip) { - dev_warn(dev, "Unable to allocate memory for chips\n"); + if (!htcpld->chip) return -ENOMEM; - } /* Add the chips as best we can */ for (i = 0; i < htcpld->nchips; i++) { -- 2.15.1