When I test the irqchip code of Loongson, I read the related code of other
chips in drivers/irqchip and I find some potential resource leaks in the
error path, I think it is better to fix them.
v2:
- Split the first patch into a new patch series which
includes small patches and add "Fixes" tag
- Use "goto" label to handle error path in some patches
v3:
- Add missed variable "ret" in the patch #5 and #13
v4:
- Modify the commit message of each patch suggested by Markus Elfring
- Make "irq_domain_remove(root_domain)" under CONFIG_SMP in patch #3
- Add a return statement before goto label in patch #4
v5:
- Modify the commit messages and do some code cleanups