dmaengine: xilinx: xdma: fix return value check in xdma_probe()
Subsystems (3)
PATCH 1/1 dmaengine: xilinx: xdma: fix return value check in xdma_probe()
devm_ioremap_resource() never returns NULL pointer, it will return ERR_PTR() when it fails, so replace the check with IS_ERR().
Fixes 17ce252266c7 ("dmaengine: xilinx: xdma: Add xilinx xdma driver")
Signed-off-by Yang Yingliang <[email protected]>
--- drivers/dma/xilinx/xdma.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/dma/xilinx/xdma.c +2 -1
@@ -892,8 +892,9 @@ 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" ); + ret =PTR_ERR (reg_base); goto failed; }
Signature · 1 line
2.25.1
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Yang" == Yang Yingliang <[email protected]> writes:
devm_ioremap_resource()never returns NULL pointer, it will returnERR_PTR()when it fails, so replace the check withIS_ERR().Fixes 17ce252266c7 ("dmaengine: xilinx: xdma: Add xilinx xdma driver")Signed-off-by Yang Yingliang <[email protected]>
Acked-by Peter Korsgaard <[email protected]>
Quoted 22 lines
--- drivers/dma/xilinx/xdma.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/dma/xilinx/xdma.c +2
-1@@ -892,8 +892,9 @@ 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" ); + ret =PTR_ERR (reg_base); goto failed; }Signature · 1 line
2.25.1
Signature · 1 line
Bye, Peter Korsgaard