mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-16 12:14:06 +00:00
soc: sifive: l2_cache: fix missing free_irq() in error path in sifive_l2_init()
commit756344e7cb
upstream. Add missing free_irq() before return error from sifive_l2_init(). Fixes:a967a289f1
("RISC-V: sifive_l2_cache: Add L2 cache controller driver for SiFive SoCs") Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Signed-off-by: Conor Dooley <conor.dooley@microchip.com> [conor: ccache -> l2_cache] Signed-off-by: Conor Dooley <conor.dooley@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
efe00d500c
commit
d0e34617c0
1 changed files with 4 additions and 1 deletions
|
@ -259,7 +259,7 @@ static int __init sifive_l2_init(void)
|
|||
rc = request_irq(g_irq[i], l2_int_handler, 0, "l2_ecc", NULL);
|
||||
if (rc) {
|
||||
pr_err("L2CACHE: Could not request IRQ %d\n", g_irq[i]);
|
||||
goto err_unmap;
|
||||
goto err_free_irq;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -273,6 +273,9 @@ static int __init sifive_l2_init(void)
|
|||
#endif
|
||||
return 0;
|
||||
|
||||
err_free_irq:
|
||||
while (--i >= 0)
|
||||
free_irq(g_irq[i], NULL);
|
||||
err_unmap:
|
||||
iounmap(l2_base);
|
||||
return rc;
|
||||
|
|
Loading…
Add table
Reference in a new issue