Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752129AbeANVaI (ORCPT + 1 other); Sun, 14 Jan 2018 16:30:08 -0500 Received: from mout.web.de ([217.72.192.78]:54692 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750911AbeANVaH (ORCPT ); Sun, 14 Jan 2018 16:30:07 -0500 To: kernel-janitors@vger.kernel.org, Lee Jones Cc: LKML From: SF Markus Elfring Subject: [PATCH] mfd/jz4740-adc: Delete an error message for a failed memory allocation in jz4740_adc_probe() Message-ID: <448b31bd-4466-b373-988f-f6452e32f390@users.sourceforge.net> Date: Sun, 14 Jan 2018 22:30:04 +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:ct/p0FesrYhGfhvbotElUzUqi2PPDTWYG+TxY8Jp2bAcbI0c2jZ TERevSZY8WmMzfAOXe4PafdpjPysMxBIqpvqs+dNPZ5z5JqflQjY0r23UlKgLSpzaE2Dtv+ nshbSV9gmigAKrXk4EL7yeN8BI+yoJlLC5LEdaVZvIhQ1T/L8luiQS1kg5c0xo2X+bc3hDI EvW8w1FsbZLzHLcrjOsXQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:j7ryEsG+dyA=:EGKtUGb/dAxxxxgVmoT3U0 en9cUZtZeawDNBELiVhQTO9zxQ1ATFGDiJ500twVDkdOOk02IicYQa3fw7kaZaZXjjWr1/4mD hvGFlFIXXgh1Va8fhJDFg5yUX2wbwKgb1UPxlugRLrgH7xgyCqZPALSiBIGt/em4tewgGDrmS fiXOIKlzcVFBrrd3TvLBMqd4pee1lXmLD6IFAK3n9Zt0v5sRpa9V84T462ZpshhPYdtF3GXFv p7Jst9S3hv9UTZuKWK9xjsMFCVEN3TW5DZPGCLxa06DbTCEX9OUBRmfFpT2TebW1IUzW66Rzg Julf5p5UfELu7j/C6w1bXu11cIHHQrnCE/DN/j4by744jKg+6rVAPxM8Gs/mwbzjOzUiHqui+ QWVTSCu1d+Cce6zgo1+fXsUCorIwhgBiZFbCBhW1J9Xj/+Do0+4IVph8he6+s15ym+oQ2VA8i +hZBbrZrGQCbcwpPWIoF+NfsXIwyq7l/GwFt0iQwSFnGLVtPnrB/Kgc46HrZgwmzdloG6TEKQ gPYIwyC8mKFgPh2hz3n4/XmYQwaDC/gCMhK1nkKI3nxgNkyw/vFhAhgVcLQEV+R3JzxwdEQGi GsrKobqhynFsany+uwJ6soYpOtS7s1qwbPZ778gFlMmAaE68+h9vqwIeTgYin3bVLI5HSD2iR 2sph+zkTfVjf+kJKvFComx2q9jUmOutNqZ4T0z/SlcmEOCAmESPzrOi9K99PCf5FRn4o5HfB/ NdQp0IFp+eme3l75qcWXiJzhS334mK5OpBbvDZJZFwrAEZfKqriV3ukddbAqPP39coCg+uSi/ tfdOoWFom6prXYqyg0XpJeDppMwYj0dSqucRPvR8x8mhE6Eu6s= 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:26:21 +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/jz4740-adc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mfd/jz4740-adc.c b/drivers/mfd/jz4740-adc.c index 798e44306382..f4cd14294b61 100644 --- a/drivers/mfd/jz4740-adc.c +++ b/drivers/mfd/jz4740-adc.c @@ -212,10 +212,8 @@ static int jz4740_adc_probe(struct platform_device *pdev) int irq_base; adc = devm_kzalloc(&pdev->dev, sizeof(*adc), GFP_KERNEL); - if (!adc) { - dev_err(&pdev->dev, "Failed to allocate driver structure\n"); + if (!adc) return -ENOMEM; - } adc->irq = platform_get_irq(pdev, 0); if (adc->irq < 0) { -- 2.15.1