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

Marcel Ziswiler marcel.ziswiler at toradex.com
Sat Jan 1 15:59:38 PST 2022


On Sun, 2022-01-02 at 00:58 +0100, Rafał Miłecki wrote:
> 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

Yep, also just noticed that. Thanks!


More information about the linux-arm-kernel mailing list