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

Fabio Estevam festevam at gmail.com
Mon Oct 19 16:12:26 PDT 2026


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

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



More information about the linux-arm-kernel mailing list