Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753001AbeAEVQg (ORCPT + 1 other); Fri, 5 Jan 2018 16:16:36 -0500 Received: from mout.web.de ([212.227.17.11]:65105 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751484AbeAEVQf (ORCPT ); Fri, 5 Jan 2018 16:16:35 -0500 To: linux-mtd@lists.infradead.org, Boris Brezillon , Brian Norris , Cyrille Pitchen , David Woodhouse , Marek Vasut , Richard Weinberger Cc: LKML , kernel-janitors@vger.kernel.org From: SF Markus Elfring Subject: [PATCH] mtd/nand/omap2: Delete an error message for a failed memory allocation in omap_nand_probe() Message-ID: <4b92ade2-5fcd-3213-bf1b-110a1e03472c@users.sourceforge.net> Date: Fri, 5 Jan 2018 22:15:47 +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:D0xSgvm1JaSUPevfFKsLruH4sJDXNy5r7vs4gIVeK9CCt+dg2ft 8zQ3QHl8Uacu7ozexuxWMdkngX89UkndlZsZplJj4gWmisKVh3rUdVvfcJEqeM1VdG96c4r wdvl4Q0a7B9DxraypVpnSUd9/5SU+M21+LXZfopbWMz32vgZT8j9267cYrjSbO1XcTKRnJk oSsTueKbCNpN7t9V3w8oA== X-UI-Out-Filterresults: notjunk:1;V01:K0:+jVhQl7RDDk=:+yCwZLCdzTyDXmfgaH9KRb ID5eduuT8MjzjjvA3vI3AzLTKIPh2XQ/GxgZZ2RlIJ62r4vlmlIoITvfb8T8UjibA3elbGGJM VV5QklbN2qCqE6w37dnqLj7qAXmoaqqxAUr1KceqwugmnnEQ1AsgJ318Ix4CgrxUP52QXoCRP KarjziaIO3vNwbXtaNfozSySM0zWOnY8manU6gq9KShtk3s+FWT4ZE/rwxZYbYUJc1gqi1ROP rLm6TMM2t2IXLmRlJ6vNrKpGx/Hm3Z2cxnak8LTmvKCXOzKA6JsLUt5DEmoeg+IMerdJaoJeU zwcwXMGP96begZSSsYQ2frie1SCavI8cBkFzYADRUV2fe7W0vQOP4pXJ4x+4EBGuLenXEYaLk excEFrAbu0MIgv5mLK6eemuQ1csu4pqUz/M735RuxdcSolYDqQApyT6OPiEkFLUL22sIFUJzn 6OZzyGoTDbeWeu0/cGk9NO7ltlNOXr+3VM8Y8BoTOwbcm7G79XUU4sm3f7/ld7Hd56aou0OM9 fANqFUIfcxqyi4rynvjvb7QbToOtbchwniNsklUgx/zCDvxt2G4ffOWHFLFa7zrKapXscHx8l BDAepl48cQ1aUE/ITupL84k4S76f6+4j2qBh0lQbzREcrhZKyzAQ7HQpYbYf0lWOPqRpHlRWA 1T9HucwXTiIPrTNIlCuKKPD1weBQZmZsy0rhEcxyrl/JPkPEf01yKAU3mlm0fssshBsJcLuoF fNn4i30ofThGNmnDe5Mu6j51s2Mssfj8gYc2QHSw8fxiRXvKGPLAZBx6uUm4wlBe6/QpHuCEh ccgAPh13o4c38K3Bo/XbXcOU74QSKO/49BnMf5SxtmQwKN/Pu8= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: From: Markus Elfring Date: Fri, 5 Jan 2018 22:10:39 +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/mtd/nand/omap2.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c index dad438c4906a..5c96c291426b 100644 --- a/drivers/mtd/nand/omap2.c +++ b/drivers/mtd/nand/omap2.c @@ -1947,10 +1947,8 @@ static int omap_nand_probe(struct platform_device *pdev) if (!mtd->name) { mtd->name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "omap2-nand.%d", info->gpmc_cs); - if (!mtd->name) { - dev_err(&pdev->dev, "Failed to set MTD name\n"); + if (!mtd->name) return -ENOMEM; - } } res = platform_get_resource(pdev, IORESOURCE_MEM, 0); -- 2.15.1