Commit 0699e578 authored by Fabrizio Castro's avatar Fabrizio Castro Committed by Thomas Gleixner
Browse files

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: default avatarFabrizio Castro <fabrizio.castro.jz@renesas.com>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20250212182034.366167-7-fabrizio.castro.jz@renesas.com
parent 4bd0317c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);