diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2017-10-03 13:54:50 +0300 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2017-10-08 16:17:39 +0530 |
commit | 4219ff33b26dbaa08c728ee4ad1a3a5aae300e1a (patch) | |
tree | a53631168f12dcbaed2065dc08e1f6ceb2ef9ab1 /drivers/dma/stm32-dmamux.c | |
parent | a4ffb13c8946abc4b92621275de6718e19db860d (diff) | |
download | linux-stable-4219ff33b26dbaa08c728ee4ad1a3a5aae300e1a.tar.gz linux-stable-4219ff33b26dbaa08c728ee4ad1a3a5aae300e1a.tar.bz2 linux-stable-4219ff33b26dbaa08c728ee4ad1a3a5aae300e1a.zip |
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.c | 4 |
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); |