mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
dmaengine: stm32-dmamux: Fix a NULL vs IS_ERR() check in probe
devm_ioremap_resource() doesn't return NULL, it returns error pointers.
Fixes: df7e762db5 ("dmaengine: Add STM32 DMAMUX driver")
Signed-off-by: Dan Carpenter <[email protected]>
Acked-by: Pierre-Yves MORDRET <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
This commit is contained in:
parent
a4ffb13c89
commit
4219ff33b2
1 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue