From: Thomas Gleixner <tglx@linutronix.de>
To: 陈骏 <chenjun102@huawei.com>,
gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org
Cc: xuqiang36@huawei.com, chenjun102@huawei.com
Subject: Re: [PATCH v2] irqchip/mbigen: Fix incorrect null pointer check
Date: Mon, 19 Feb 2024 15:15:10 +0100 [thread overview]
Message-ID: <87il2ka6c1.ffs@tglx> (raw)
In-Reply-To: <20240219085314.85363-1-chenjun102@huawei.com>
Chen!
On Mon, Feb 19 2024 at 16:53, 陈骏 wrote:
> From: Chen Jun <chenjun102@huawei.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@huawei.com>
Needs a
Cc: stable@vger.kernel.org
under the Signed-off-by tag.
Thanks,
tglx
prev parent reply other threads:[~2024-02-19 14:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-19 8:53 [PATCH v2] irqchip/mbigen: Fix incorrect null pointer check 陈骏
2024-02-19 9:14 ` Greg KH
2024-02-19 14:15 ` Thomas Gleixner [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87il2ka6c1.ffs@tglx \
--to=tglx@linutronix.de \
--cc=chenjun102@huawei.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=xuqiang36@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.