* [PATCH] mtd/nand/omap2: Delete an error message for a failed memory allocation in omap_nand_probe()
@ 2018-01-05 21:15 SF Markus Elfring
0 siblings, 0 replies; only message in thread
From: SF Markus Elfring @ 2018-01-05 21:15 UTC (permalink / raw)
To: linux-mtd, Boris Brezillon, Brian Norris, Cyrille Pitchen,
David Woodhouse, Marek Vasut, Richard Weinberger
Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
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 <elfring@users.sourceforge.net>
---
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-01-05 21:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-05 21:15 [PATCH] mtd/nand/omap2: Delete an error message for a failed memory allocation in omap_nand_probe() SF Markus Elfring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome