Re: [PATCH] irqchip/mbigen: Fix incorrect null pointer check

From: Thomas Gleixner
Date: Sun Feb 18 2024 - 14:58:54 EST


On Sun, Feb 18 2024 at 03:13, chenjun (AM) wrote:
> 在 2024/2/13 18:09, Thomas Gleixner 写道:
>> On Mon, Jan 29 2024 at 21:00, Chen Jun wrote:
>>
>> That's not about an incorrect NULL pointer check. That's about using a
>> function which is guaranteed to return NULL on your platform, no?
>>
>>> bus_get_dev_root(&platform_bus_type) always returns NULL.
>>
>> Lacks an explanation why this always returns NULL.
>>
>
> Thank you for the reply.
>
> bus_get_dev_root returns sp->dev_root set in subsys_register.
> And subsys_register is not called by platform_bus_init.
>
> So, for platform_bus_type, bus_get_dev_root always returns NULL.

Please add this information to the change log.

Thanks,

tglx