On Mo, 2025-01-27 at 11:37 +0000, Biju Das wrote: > Simplify rzv2h_icu_init() by using devm_pm_runtime_enable(). > > Signed-off-by: Biju Das <biju.das.jz@xxxxxxxxxxxxxx> > --- > v2: > * New patch. > --- > drivers/irqchip/irq-renesas-rzv2h.c | 11 +++++++---- > 1 file changed, 7 insertions(+), 4 deletions(-) > > diff --git a/drivers/irqchip/irq-renesas-rzv2h.c b/drivers/irqchip/irq-renesas-rzv2h.c > index 5c5d2e015a88..f90652013082 100644 > --- a/drivers/irqchip/irq-renesas-rzv2h.c > +++ b/drivers/irqchip/irq-renesas-rzv2h.c > @@ -463,11 +463,16 @@ static int rzv2h_icu_init(struct device_node *node, struct device_node *parent) > goto put_dev; > } > > - pm_runtime_enable(&pdev->dev); > + ret = devm_pm_runtime_enable(&pdev->dev); > + if (ret < 0) { > + dev_err(&pdev->dev, "devm_pm_runtime_enable failed, %d\n", ret); > + goto put_dev; > + } > + > ret = pm_runtime_resume_and_get(&pdev->dev); > if (ret < 0) { > dev_err(&pdev->dev, "pm_runtime_resume_and_get failed: %d\n", ret); > - goto pm_disable; > + goto put_dev; > } > > raw_spin_lock_init(&rzv2h_icu_data->lock); > @@ -488,8 +493,6 @@ static int rzv2h_icu_init(struct device_node *node, struct device_node *parent) > > pm_put: > pm_runtime_put(&pdev->dev); > -pm_disable: > - pm_runtime_disable(&pdev->dev); > put_dev: > put_device(&pdev->dev); Same comment as for the previous patch, pm_runtime_disable() is now called after put_device(). regards Philipp