]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
dmaengine: fsl-qdma: check dma_set_mask return value
authorRobin Gong <yibin.gong@nxp.com>
Mon, 26 Apr 2021 08:59:09 +0000 (16:59 +0800)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 20 Sep 2021 13:39:40 +0000 (15:39 +0200)
BugLink: https://bugs.launchpad.net/bugs/1939738
[ Upstream commit f0c07993af0acf5545d5c1445798846565f4f147 ]

For fix below warning reported by static code analysis tool like Coverity
from Synopsys:

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Addresses-Coverity-ID: 12285639 ("Unchecked return value")
Link: https://lore.kernel.org/r/1619427549-20498-1-git-send-email-yibin.gong@nxp.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/dma/fsl-qdma.c

index ed2ab46b15e7f11f1f73ee7c41f3427a9f9dc74f..045ead46ec8fcb6fb410e219165c2a944a77f7f5 100644 (file)
@@ -1235,7 +1235,11 @@ static int fsl_qdma_probe(struct platform_device *pdev)
        fsl_qdma->dma_dev.device_synchronize = fsl_qdma_synchronize;
        fsl_qdma->dma_dev.device_terminate_all = fsl_qdma_terminate_all;
 
-       dma_set_mask(&pdev->dev, DMA_BIT_MASK(40));
+       ret = dma_set_mask(&pdev->dev, DMA_BIT_MASK(40));
+       if (ret) {
+               dev_err(&pdev->dev, "dma_set_mask failure.\n");
+               return ret;
+       }
 
        platform_set_drvdata(pdev, fsl_qdma);