Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751295AbeAPJON (ORCPT + 1 other); Tue, 16 Jan 2018 04:14:13 -0500 Received: from mout.web.de ([212.227.17.11]:49703 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750821AbeAPJOL (ORCPT ); Tue, 16 Jan 2018 04:14:11 -0500 To: kernel-janitors@vger.kernel.org, Lee Jones Cc: LKML From: SF Markus Elfring Subject: [PATCH] mfd/ti_am335x_tscadc: Delete an error message for a failed memory allocation in ti_tscadc_probe() Message-ID: Date: Tue, 16 Jan 2018 10:14:08 +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:OLWc6r2IvN5zyWjWO6Tdyd+WlCtPDaO+X8nDmmpjSY8f3NNYc4a 96PNF3Dg3JmFFcfnHI35hrvXESk6+ZO818YhMe/0XrdFv+wqhvjinfkzwMwzTIkdqWMr9Qn JczjPMclGA8I0aov8q/yp5+ratLAFvOWbvoB0KsxGETxMk09ZyWn5HkwCmWeJY5U8Wy3OK3 qiMMU9N4DqvfeaUUoTYFA== X-UI-Out-Filterresults: notjunk:1;V01:K0:4C+i8xYesYA=:QXeP8DB4iKKGFYm5gt8yvq pznlrsdxrH3TzY7dibsT7cmGto/tfJ5gedB6RkvKt9IFmTrsUE3Q2ahXI9pigIg5vtfDRHdXg Nzg1TIzFX7+j+NSyGnqvZQeE2r7jgkDaemo4a2X5YnhOs0D3LClDAnMf5ezW3Tq49f+6ZdEAG vXH/i05NnpfTDiGsOJ19G0OcNElpUvaKWu8IlEYiAjb6+1LbfUIImKQ44fU4x+WIn98O/61VP waKDKScMCZ6x9EP2XVkfwCyU/FuwrQtA6gDf0OWUxrcjy5PZ4PTOHAXenfSjCSmfiy/WNTFxH 0B3QflrsRVd0CVpQVkCs/5oGASvdm3DyJC6HrVF/QJcSKoN0KKO3Yu4k8VN7sAqz8rSMDQ8jp AJmp+2cRlCutl2Ajd0cDvFbGUV1jgF6PU2bL0Ws2iawruFy2SxweZ/at3gNYk7Ou+dhmhhQUk hE4sQVR6gRHJorPes9/Rjq/X0iXjLxu82z9zuFcFSxIOpWP3Hehc20/R+A52K/6yNLwMIZlYr lzoOabO/Fh0dZfVYzXYKS5cTMqqydM0KatF8rrCFdfmx8u1scN4wAvu2c7zIcrEWVE6lsMotx yUHcOFQYYA4SSmY7H3UeUOqMCAfdlT7cSt1twNywSkZyTVG/uvy4Hbsn1hzjb4pqHvu0gi92b oshx/zHyKi3GgAuL4a4qSVrob3kiMoS8N4RhPXv2jtSnLW6j8o824QMccDNIzT3hDZ0L0ChP5 R2vju2PczxxBj21UtTZ5w9KXlzDCxtDwIFkCNBv99dJ9liNGPBQovnsRZD/mmtn+Gyyp/+MlQ 7EURjbTHmtYlGWjtVnX6MeXTCfjHtNyFavjvuERmNKwWIeRLzg= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: From: Markus Elfring Date: Tue, 16 Jan 2018 10:07:43 +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/ti_am335x_tscadc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/mfd/ti_am335x_tscadc.c b/drivers/mfd/ti_am335x_tscadc.c index 3cd958a31f36..47012c0899cd 100644 --- a/drivers/mfd/ti_am335x_tscadc.c +++ b/drivers/mfd/ti_am335x_tscadc.c @@ -169,10 +169,9 @@ static int ti_tscadc_probe(struct platform_device *pdev) /* Allocate memory for device */ tscadc = devm_kzalloc(&pdev->dev, sizeof(*tscadc), GFP_KERNEL); - if (!tscadc) { - dev_err(&pdev->dev, "failed to allocate memory.\n"); + if (!tscadc) return -ENOMEM; - } + tscadc->dev = &pdev->dev; err = platform_get_irq(pdev, 0); -- 2.15.1