Re: [PATCH] pinctrl: imx: Use of_device_id match table for per-SoC data

From: Fabio Estevam

Date: Mon Oct 19 2026 - 19:12:54 EST


On Mon, Oct 19, 2026 at 8:05 AM <joy.zou@xxxxxxxxxxx> 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().

> + 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.