Re: [PATCH 4/6] irqchip/renesas-rzg2l: Remove pm_put label
From: Lad, Prabhakar
Date: Thu Feb 13 2025 - 04:42:43 EST
On Wed, Feb 12, 2025 at 6:22 PM Fabrizio Castro
<fabrizio.castro.jz@xxxxxxxxxxx> wrote:
>
> No need to keep label `pm_put`, as it's only used once.
> Call pm_runtime_put() directly from the error path.
>
> Signed-off-by: Fabrizio Castro <fabrizio.castro.jz@xxxxxxxxxxx>
> ---
> drivers/irqchip/irq-renesas-rzg2l.c | 9 ++-------
> 1 file changed, 2 insertions(+), 7 deletions(-)
>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@xxxxxxxxxxxxxx>
Cheers,
Prabhakar
> diff --git a/drivers/irqchip/irq-renesas-rzg2l.c b/drivers/irqchip/irq-renesas-rzg2l.c
> index c024023a1832..0f325ceb0f53 100644
> --- a/drivers/irqchip/irq-renesas-rzg2l.c
> +++ b/drivers/irqchip/irq-renesas-rzg2l.c
> @@ -586,9 +586,9 @@ static int rzg2l_irqc_common_init(struct device_node *node, struct device_node *
> node, &rzg2l_irqc_domain_ops,
> rzg2l_irqc_data);
> if (!irq_domain) {
> + pm_runtime_put(dev);
> dev_err(dev, "failed to add irq domain\n");
> - ret = -ENOMEM;
> - goto pm_put;
> + return -ENOMEM;
> }
>
> register_syscore_ops(&rzg2l_irqc_syscore_ops);
> @@ -605,11 +605,6 @@ static int rzg2l_irqc_common_init(struct device_node *node, struct device_node *
> dev = NULL;
>
> return 0;
> -
> -pm_put:
> - pm_runtime_put(dev);
> -
> - return ret;
> }
>
> static int __init rzg2l_irqc_init(struct device_node *node,
> --
> 2.34.1
>
>