Re: [PATCH v4 02/14] irqchip/csky-apb-intc: Fix potential resource leaks

From: Markus Elfring
Date: Wed Jul 01 2020 - 04:40:58 EST


> â were not released in a few error cases. â

Another small wording adjustment:
â in two error cases. â


â
> +++ b/drivers/irqchip/irq-csky-apb-intc.c
â
> @@ -126,10 +127,17 @@ ck_intc_init_comm(struct device_node *node, struct device_node *parent)
â
> +err_iounmap:
> + iounmap(reg_base);
> + return ret;
> }
â

How do you think about to use the statement âreturn -ENOMEM;â?
Can the local variable âretâ be omitted in this function implementation?

Regards,
Markus