summaryrefslogtreecommitdiff
path: root/drivers/dma/stm32-dmamux.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2017-10-03 13:54:50 +0300
committerVinod Koul <vinod.koul@intel.com>2017-10-08 13:47:39 +0300
commit4219ff33b26dbaa08c728ee4ad1a3a5aae300e1a (patch)
treea53631168f12dcbaed2065dc08e1f6ceb2ef9ab1 /drivers/dma/stm32-dmamux.c
parenta4ffb13c8946abc4b92621275de6718e19db860d (diff)
downloadlinux-4219ff33b26dbaa08c728ee4ad1a3a5aae300e1a.tar.xz
dmaengine: stm32-dmamux: Fix a NULL vs IS_ERR() check in probe
devm_ioremap_resource() doesn't return NULL, it returns error pointers. Fixes: df7e762db5f6 ("dmaengine: Add STM32 DMAMUX driver") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Pierre-Yves MORDRET <pierre-yves.mordret@st.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/stm32-dmamux.c')
-rw-r--r--drivers/dma/stm32-dmamux.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/dma/stm32-dmamux.c b/drivers/dma/stm32-dmamux.c
index 22812e7a953b..d5db0f6e1ff8 100644
--- a/drivers/dma/stm32-dmamux.c
+++ b/drivers/dma/stm32-dmamux.c
@@ -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);