]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
dmaengine: xilinx: xdma: Fix Judgment of the return value
authorMinjie Du <duminjie@vivo.com>
Wed, 5 Jul 2023 11:39:12 +0000 (19:39 +0800)
committerVinod Koul <vkoul@kernel.org>
Wed, 12 Jul 2023 16:52:37 +0000 (22:22 +0530)
Fix: make IS_ERR() judge the devm_ioremap_resource() function return.

Fixes: 17ce252266c7 ("dmaengine: xilinx: xdma: Add xilinx xdma driver")
Signed-off-by: Minjie Du <duminjie@vivo.com>
Acked-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/20230705113912.16247-1-duminjie@vivo.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/xilinx/xdma.c

index 93ee298d52b894f1a7200844168c2baaf0406763..ad5ff63354cf059de276f2435bebd4e808cc3c11 100644 (file)
@@ -892,7 +892,7 @@ static int xdma_probe(struct platform_device *pdev)
        }
 
        reg_base = devm_ioremap_resource(&pdev->dev, res);
-       if (!reg_base) {
+       if (IS_ERR(reg_base)) {
                xdma_err(xdev, "ioremap failed");
                goto failed;
        }