Skip to content

Commit

Permalink
dmaengine: xilinx: xdma: Fix Judgment of the return value
Browse files Browse the repository at this point in the history
commit a68b48a upstream.

Fix: make IS_ERR() judge the devm_ioremap_resource() function return.

Fixes: 17ce252 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Minjie Du authored and gregkh committed Aug 16, 2023
1 parent 65b8840 commit 3896d81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/dma/xilinx/xdma.c
Expand Up @@ -894,7 +894,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;
}
Expand Down

0 comments on commit 3896d81

Please sign in to comment.