dmaengine: at_xdmac: Delete an error message for a failed memory allocation in at_xdmac_probe()
Subsystems (3)
PATCH 1/1 dmaengine: at_xdmac: Delete an error message for a failed memory allocation in at_xdmac_probe()
From: Markus Elfring <[email protected]>
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 <[email protected]>
--- drivers/dma/at_xdmac.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/dma/at_xdmac.c +1 -3
@@ -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;