Skip to content

Commit e84ee1a

Browse files
YuuoniyLee Jones
authored andcommitted
mfd: asic3: Add missing iounmap() on error asic3_mfd_probe
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 <linmq006@gmail.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20220307072947.5369-1-linmq006@gmail.com
1 parent e4f8e06 commit e84ee1a

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

drivers/mfd/asic3.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -906,14 +906,14 @@ static int __init asic3_mfd_probe(struct platform_device *pdev,
906906
ret = mfd_add_devices(&pdev->dev, pdev->id,
907907
&asic3_cell_ds1wm, 1, mem, asic->irq_base, NULL);
908908
if (ret < 0)
909-
goto out;
909+
goto out_unmap;
910910
}
911911

912912
if (mem_sdio && (irq >= 0)) {
913913
ret = mfd_add_devices(&pdev->dev, pdev->id,
914914
&asic3_cell_mmc, 1, mem_sdio, irq, NULL);
915915
if (ret < 0)
916-
goto out;
916+
goto out_unmap;
917917
}
918918

919919
ret = 0;
@@ -927,8 +927,12 @@ static int __init asic3_mfd_probe(struct platform_device *pdev,
927927
ret = mfd_add_devices(&pdev->dev, 0,
928928
asic3_cell_leds, ASIC3_NUM_LEDS, NULL, 0, NULL);
929929
}
930+
return ret;
930931

931-
out:
932+
out_unmap:
933+
if (asic->tmio_cnf)
934+
iounmap(asic->tmio_cnf);
935+
out:
932936
return ret;
933937
}
934938

0 commit comments

Comments
 (0)