]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
irqchip/mbigen: Don't use bus_get_dev_root() to find the parent
authorChen Jun <chenjun102@huawei.com>
Tue, 20 Feb 2024 11:14:29 +0000 (19:14 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 1 Mar 2024 12:35:01 +0000 (13:35 +0100)
commita9ab338683a243f93ff467ead1c02cf0c57600f3
tree5a6d9bd85fc31e0631dd0857927e70b971e945dc
parentb0365460e945e1117b47cf7329d86de752daff63
irqchip/mbigen: Don't use bus_get_dev_root() to find the parent

commit fb33a46cd75e18773dd5a414744507d84ae90870 upstream.

bus_get_dev_root() returns sp->dev_root which is set in subsys_register(),
but subsys_register() is not called by platform_bus_init().

Therefor for the platform_bus_type, bus_get_dev_root() always returns NULL.
This makes mbigen_of_create_domain() always return -ENODEV.

Don't try to retrieve the parent via bus_get_dev_root() and
unconditionally hand a NULL pointer to of_platform_device_create() to
fix this.

Fixes: fea087fc291b ("irqchip/mbigen: move to use bus_get_dev_root()")
Signed-off-by: Chen Jun <chenjun102@huawei.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20240220111429.110666-1-chenjun102@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/irqchip/irq-mbigen.c