]> Gentwo Git Trees - linux/.git/commit
irqchip/riscv-aplic: Simplify the initialization code
authorJinjie Ruan <ruanjinjie@huawei.com>
Mon, 3 Jun 2024 12:56:52 +0000 (12:56 +0000)
committerThomas Gleixner <tglx@linutronix.de>
Sun, 23 Jun 2024 17:09:14 +0000 (19:09 +0200)
commitef7080bd30bab81a1c4dd7c0afd942d2ab43081d
treecfaf095ec7f85a2c48f06bfa9beccd44068a79c6
parent760d7e719499d64beea62bfcf53938fb233bb6e7
irqchip/riscv-aplic: Simplify the initialization code

The initialization code has an is_of_node() check and invokes to_of_node()
for every of_property_*() invocation.

to_of_node() has a is_of_node() check already, so simplify the code by
invoking to_of_node() and checking that for NULL. If not NULL hand in the
node pointer to of_property_*().

The same applies to of_property_*() which fails when invoked with a NULL
node pointer.

[ tglx: Massaged change log ]

Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20240603125652.791601-1-ruanjinjie@huawei.com
drivers/irqchip/irq-riscv-aplic-main.c