From: Joy Zou <joy.zou@oss.nxp.com>
To: Fabio Estevam <festevam@gmail.com>
Cc: Peng Fan <peng.fan@nxp.com>, Dong Aisheng <aisheng.dong@nxp.com>,
Frank Li <Frank.Li@nxp.com>, Jacky Bai <ping.bai@nxp.com>,
Ye Li <ye.li@nxp.com>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
NXP S32 Linux Team <s32@nxp.com>,
Linus Walleij <linusw@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
linux-gpio@vger.kernel.org, imx@lists.linux.dev,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Joy Zou <joy.zou@nxp.com>
Subject: Re: [PATCH] pinctrl: imx: Use of_device_id match table for per-SoC data
Date: Wed, 11 Nov 2026 15:15:07 +0800 [thread overview]
Message-ID: <avQV+8VrthWpKAWT@shlinux89> (raw)
In-Reply-To: <CAOMZO5D1XDc7C6H9jYTtpiPah3DnQxJz35t+3k0--a072KsMuA@mail.gmail.com>
On Mon, Oct 19, 2026 at 08:12:26PM -0300, Fabio Estevam wrote:
> On Mon, Oct 19, 2026 at 8:05 AM <joy.zou@oss.nxp.com> wrote:
>
> > + if (!pmx->data) {
> > + dev_err(pctldev->dev, "platform does not support scmi pinctrl\n");
> > + return -EINVAL;
>
> This NULL check seems redundant as pmx->data has already been NULL
> checked in probe().
Thanks for spotting this.
You're right, pmx->data has already been checked in probe(), so this NULL
check is redundant. I'll drop it in next version.
>
> > + pmx->data = of_machine_get_match_data(scmi_pinctrl_imx_data);
> > + if (!pmx->data)
> > + return -ENODEV;
>
> Can this be NULL? If there is no match, the driver would not be probed.
You're right that it should never return NULL in the normal probe path.
I kept the check as a defensive guard in case the match data table is
modified incorrectly in the future. However, if you think this is
unnecessarily defensive, I can remove it in the next revision.
next prev parent reply other threads:[~2026-11-11 7:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-19 11:09 joy.zou
2026-10-19 19:30 ` Frank Li
2026-10-19 23:12 ` Fabio Estevam
2026-11-11 7:15 ` Joy Zou [this message]
2026-11-04 12:54 ` Linus Walleij
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=avQV+8VrthWpKAWT@shlinux89 \
--to=joy.zou@oss.nxp.com \
--cc=Frank.Li@nxp.com \
--cc=aisheng.dong@nxp.com \
--cc=festevam@gmail.com \
--cc=imx@lists.linux.dev \
--cc=joy.zou@nxp.com \
--cc=kernel@pengutronix.de \
--cc=linusw@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peng.fan@nxp.com \
--cc=ping.bai@nxp.com \
--cc=s.hauer@pengutronix.de \
--cc=s32@nxp.com \
--cc=ye.li@nxp.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®