linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dmaengine: at_xdmac: Delete an error message for a failed memory allocation in at_xdmac_probe()
@ 2018-02-13 20:54 SF Markus Elfring
  0 siblings, 0 replies; only message in thread
From: SF Markus Elfring @ 2018-02-13 20:54 UTC (permalink / raw)
  To: linux-arm-kernel

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Tue, 13 Feb 2018 21:48:26 +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/dma/at_xdmac.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c
index c00e3923d7d8..818ab96f9601 100644
--- a/drivers/dma/at_xdmac.c
+++ b/drivers/dma/at_xdmac.c
@@ -1950,10 +1950,8 @@ static int at_xdmac_probe(struct platform_device *pdev)
 	size = sizeof(*atxdmac);
 	size += nr_channels * sizeof(struct at_xdmac_chan);
 	atxdmac = devm_kzalloc(&pdev->dev, size, GFP_KERNEL);
-	if (!atxdmac) {
-		dev_err(&pdev->dev, "can't allocate at_xdmac structure\n");
+	if (!atxdmac)
 		return -ENOMEM;
-	}
 
 	atxdmac->regs = base;
 	atxdmac->irq = irq;
-- 
2.16.1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-02-13 20:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-13 20:54 [PATCH] dmaengine: at_xdmac: Delete an error message for a failed memory allocation in at_xdmac_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;
as well as URLs for NNTP newsgroup(s).