Commit 4219ff33 authored by Dan Carpenter's avatar Dan Carpenter Committed by Vinod Koul

dmaengine: stm32-dmamux: Fix a NULL vs IS_ERR() check in probe

devm_ioremap_resource() doesn't return NULL, it returns error pointers.

Fixes: df7e762d ("dmaengine: Add STM32 DMAMUX driver")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarPierre-Yves MORDRET <pierre-yves.mordret@st.com>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent a4ffb13c
......@@ -257,8 +257,8 @@ static int stm32_dmamux_probe(struct platform_device *pdev)
return -ENODEV;
iomem = devm_ioremap_resource(&pdev->dev, res);
if (!iomem)
return -ENOMEM;
if (IS_ERR(iomem))
return PTR_ERR(iomem);
spin_lock_init(&stm32_dmamux->lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment