[PATCH V2 1/4] pinctrl: imx: prepare for making "group_names" in "function_desc" const

Rafał Miłecki zajec5 at gmail.com
Sat Jan 1 15:58:06 PST 2022


On 2.01.2022 00:55, Marcel Ziswiler wrote:
> On Wed, 2021-12-22 at 22:24 +0200, Abel Vesa wrote:
>>> @@ -663,14 +664,16 @@ static int imx_pinctrl_parse_functions(struct device_node *np,
>>>                  dev_err(ipctl->dev, "no groups defined in %pOF\n", np);
>>>                  return -EINVAL;
>>>          }
>>> -       func->group_names = devm_kcalloc(ipctl->dev, func->num_group_names,
>>> -                                        sizeof(char *), GFP_KERNEL);
>>> +
>>> +       group_names = devm_kcalloc(ipctl->dev, func->num_group_names,
>>> +                                  sizeof(char *), GFP_KERNEL);
>>>          if (!func->group_names)
>> This line needs to be:
>>          if (!group_names)
>>
>> Otherwise, the driver never probes successufully.
> 
> After my i.MX 8M Mini target running latest -next just hang early boot I bisected it to this commit.
> 
> I can confirm that this fixes it. Thanks!

Please note there is one more pending fix. Please apply both:
[PATCH] pinctrl: imx: fix allocation result check
[PATCH] pinctrl: imx: fix assigning groups names



More information about the linux-arm-kernel mailing list