lkml.org 
[lkml]   [2020]   [Jul]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v4 03/14] irqchip/csky-mpintc: Fix potential resource leaks
From
Date
> exception handling. By the way, do some coding-style cleanups

I propose to consider another bit of fine-tuning.



> +++ b/drivers/irqchip/irq-csky-mpintc.c

> @@ -270,12 +274,24 @@ csky_mpintc_init(struct device_node *node, struct device_node *parent)
>
> #ifdef CONFIG_SMP
> ipi_irq = irq_create_mapping(root_domain, IPI_IRQ);
> - if (!ipi_irq)
> - return -EIO;
> + if (!ipi_irq) {
> + ret = -EIO;
> + goto err_domain_remove;

How do you think about to use the following source code variant
at this place?

+ irq_domain_remove(root_domain);
+ ret = -EIO;
+ goto err_iounmap;


Would you like to avoid the repetition of the check “#ifdef CONFIG_SMP”?

Regards,
Markus

\
 
 \ /
  Last update: 2020-07-01 09:50    [W:0.138 / U:0.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site