Skip to content

Commit

Permalink
irqchip/renesas-rzg2l: Simplify checks in rzg2l_irqc_common_init()
Browse files Browse the repository at this point in the history
Both devm_pm_runtime_enable() and pm_runtime_resume_and_get()
return 0 or a negative error code.

Simplify the checks done with their respective return values
accordingly.

Signed-off-by: Fabrizio Castro <fabrizio.castro.jz@renesas.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20250212182034.366167-7-fabrizio.castro.jz@renesas.com
  • Loading branch information
Fabrizio Castro authored and Thomas Gleixner committed Feb 18, 2025
1 parent 4bd0317 commit 0699e57
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/irqchip/irq-renesas-rzg2l.c
Original file line number Diff line number Diff line change
Expand Up @@ -565,11 +565,11 @@ static int rzg2l_irqc_common_init(struct device_node *node, struct device_node *
}

ret = devm_pm_runtime_enable(dev);
if (ret < 0)
if (ret)
return dev_err_probe(dev, ret, "devm_pm_runtime_enable failed: %d\n", ret);

ret = pm_runtime_resume_and_get(dev);
if (ret < 0)
if (ret)
return dev_err_probe(dev, ret, "pm_runtime_resume_and_get failed: %d\n", ret);

raw_spin_lock_init(&rzg2l_irqc_data->lock);
Expand Down

0 comments on commit 0699e57

Please sign in to comment.