Skip to content

Commit 0699e57

Browse files
Fabrizio CastroKAGA-KOKO
authored andcommitted
irqchip/renesas-rzg2l: Simplify checks in rzg2l_irqc_common_init()
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 <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Link: https://lore.kernel.org/all/[email protected]
1 parent 4bd0317 commit 0699e57

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/irqchip/irq-renesas-rzg2l.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -565,11 +565,11 @@ static int rzg2l_irqc_common_init(struct device_node *node, struct device_node *
565565
}
566566

567567
ret = devm_pm_runtime_enable(dev);
568-
if (ret < 0)
568+
if (ret)
569569
return dev_err_probe(dev, ret, "devm_pm_runtime_enable failed: %d\n", ret);
570570

571571
ret = pm_runtime_resume_and_get(dev);
572-
if (ret < 0)
572+
if (ret)
573573
return dev_err_probe(dev, ret, "pm_runtime_resume_and_get failed: %d\n", ret);
574574

575575
raw_spin_lock_init(&rzg2l_irqc_data->lock);

0 commit comments

Comments
 (0)