Skip to content

Commit

Permalink
mfd: asic3: Add missing iounmap() on error asic3_mfd_probe
Browse files Browse the repository at this point in the history
Add the missing iounmap() before return from asic3_mfd_probe
in the error handling case.

Fixes: 64e8867 ("mfd: tmio_mmc hardware abstraction for CNF area")
Signed-off-by: Miaoqian Lin <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
  • Loading branch information
Yuuoniy authored and Lee Jones committed Mar 23, 2022
1 parent e4f8e06 commit e84ee1a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions drivers/mfd/asic3.c
Original file line number Diff line number Diff line change
Expand Up @@ -906,14 +906,14 @@ static int __init asic3_mfd_probe(struct platform_device *pdev,
ret = mfd_add_devices(&pdev->dev, pdev->id,
&asic3_cell_ds1wm, 1, mem, asic->irq_base, NULL);
if (ret < 0)
goto out;
goto out_unmap;
}

if (mem_sdio && (irq >= 0)) {
ret = mfd_add_devices(&pdev->dev, pdev->id,
&asic3_cell_mmc, 1, mem_sdio, irq, NULL);
if (ret < 0)
goto out;
goto out_unmap;
}

ret = 0;
Expand All @@ -927,8 +927,12 @@ static int __init asic3_mfd_probe(struct platform_device *pdev,
ret = mfd_add_devices(&pdev->dev, 0,
asic3_cell_leds, ASIC3_NUM_LEDS, NULL, 0, NULL);
}
return ret;

out:
out_unmap:
if (asic->tmio_cnf)
iounmap(asic->tmio_cnf);
out:
return ret;
}

Expand Down

0 comments on commit e84ee1a

Please sign in to comment.