[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87il2ka6c1.ffs@tglx>
Date: Mon, 19 Feb 2024 15:15:10 +0100
From: Thomas Gleixner <tglx@...utronix.de>
To: 陈骏 <chenjun102@...wei.com>,
gregkh@...uxfoundation.org,
linux-kernel@...r.kernel.org
Cc: xuqiang36@...wei.com, chenjun102@...wei.com
Subject: Re: [PATCH v2] irqchip/mbigen: Fix incorrect null pointer check
Chen!
On Mon, Feb 19 2024 at 16:53, 陈骏 wrote:
> From: Chen Jun <chenjun102@...wei.com>
As I said before, the subject line does not make sense. This is not
about an incorrect NULL pointer check. It's about using a function which
is guaranteed to return NULL on your platform. Something like:
irqchip/mbigen: Don't use bus_get_dev_root() to find the parent
makes it pretty clear what this is about.
> bus_get_dev_root returns sp->dev_root set in subsys_register.
> And subsys_register is not called by platform_bus_init.
Please use '()' when referencing functions. See:
https://www.kernel.org/doc/html/latest/process/maintainer-tip.html#function-references-in-changelogs
> For platform_bus_type, bus_get_dev_root always returns NULL.
> This makes mbigen_of_create_domain always return -ENODEV.
This lacks an information how the above problem is solved,
i.e. something like:
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.
Hmm?
> Fixes: fea087fc291b ("irqchip/mbigen: move to use bus_get_dev_root()")
> Signed-off-by: Chen Jun <chenjun102@...wei.com>
Needs a
Cc: stable@...r.kernel.org
under the Signed-off-by tag.
Thanks,
tglx
Powered by blists - more mailing lists