Message ID | 20211222212807.27122-1-zajec5@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | pinctrl: imx: fix allocation result check | expand |
On 21-12-22 22:28:07, Rafał Miłecki wrote: > From: Rafał Miłecki <rafal@milecki.pl> > > Fix code to check correct variable value. > > Reported-by: Abel Vesa <abel.vesa@nxp.com> Reviewed-by: Abel Vesa <abel.vesa@nxp.com> > Fixes: 02f117134952 ("pinctrl: imx: prepare for making "group_names" in "function_desc" const") > Signed-off-by: Rafał Miłecki <rafal@milecki.pl> > --- > Linus: I'm not sure if you can rebase your tree. Treat it as separated > patch or fixup. Depending on how to manage your repository. > --- > drivers/pinctrl/freescale/pinctrl-imx.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/pinctrl/freescale/pinctrl-imx.c b/drivers/pinctrl/freescale/pinctrl-imx.c > index 47b2ab1a14d0..16bc1bfc03e4 100644 > --- a/drivers/pinctrl/freescale/pinctrl-imx.c > +++ b/drivers/pinctrl/freescale/pinctrl-imx.c > @@ -667,7 +667,7 @@ static int imx_pinctrl_parse_functions(struct device_node *np, > > group_names = devm_kcalloc(ipctl->dev, func->num_group_names, > sizeof(char *), GFP_KERNEL); > - if (!func->group_names) > + if (!group_names) > return -ENOMEM; > for_each_child_of_node(np, child) > group_names[i] = child->name; > -- > 2.31.1 >
On Thu, Dec 23, 2021 at 4:56 AM Abel Vesa <abel.vesa@nxp.com> wrote: > > On 21-12-22 22:28:07, Rafał Miłecki wrote: > > From: Rafał Miłecki <rafal@milecki.pl> > > > > Fix code to check correct variable value. > > > > Reported-by: Abel Vesa <abel.vesa@nxp.com> > > Reviewed-by: Abel Vesa <abel.vesa@nxp.com> After applying this fix, I can boot an imx7s-warp board on linux-next, but there are several "invalid group" errors: # dmesg | grep pinctrl [ 0.072510] pinctrl core: initialized pinctrl subsystem [ 0.169977] imx7d-pinctrl 302c0000.iomuxc-lpsr: initialized IMX pinctrl driver [ 0.176003] imx7d-pinctrl 30330000.pinctrl: initialized IMX pinctrl driver [ 0.379887] imx7d-pinctrl 30330000.pinctrl: invalid group "brcmreggrp" for function "pinctrl" [ 0.381957] imx7d-pinctrl 30330000.pinctrl: invalid group "btreggrp" for function "pinctrl" [ 0.399802] imx7d-pinctrl 30330000.pinctrl: invalid group "i2c1grp" for function "pinctrl" [ 0.405120] imx7d-pinctrl 30330000.pinctrl: invalid group "i2c2grp" for function "pinctrl" [ 0.414204] imx7d-pinctrl 30330000.pinctrl: invalid group "i2c3grp" for function "pinctrl" [ 0.416103] imx7d-pinctrl 30330000.pinctrl: invalid group "i2c4grp" for function "pinctrl" [ 2.552967] imx7d-pinctrl 30330000.pinctrl: invalid group "uart1grp" for function "pinctrl" [ 3.527187] imx7d-pinctrl 30330000.pinctrl: invalid group "uart3grp" for function "pinctrl" [ 3.548179] imx7d-pinctrl 30330000.pinctrl: invalid group "uart6grp" for function "pinctrl" [ 3.923545] imx7d-pinctrl 30330000.pinctrl: invalid group "usdhc1grp" for function "pinctrl" [ 3.949302] imx7d-pinctrl 30330000.pinctrl: invalid group "usdhc3grp" for function "pinctrl" [ 3.958183] imx7d-pinctrl 30330000.pinctrl: invalid group "usdhc3grp_100mhz" for function "pinctrl" [ 4.657275] imx7d-pinctrl 30330000.pinctrl: invalid group "sai1mclkgrp" for function "pinctrl" [ 5.201507] imx7d-pinctrl 30330000.pinctrl: invalid group "sai1grp" for function "pinctrl" [ 5.866850] imx7d-pinctrl 30330000.pinctrl: invalid group "sai1grp" for function "pinctrl" [ 5.889662] imx7d-pinctrl 30330000.pinctrl: invalid group "sai1grp" for function "pinctrl" [ 5.907229] imx7d-pinctrl 30330000.pinctrl: invalid group "gpiogrp" for function "pinctrl" [ 5.936451] imx7d-pinctrl 30330000.pinctrl: invalid group "sai1grp" for function "pinctrl"
On Wed, Dec 22, 2021 at 10:28 PM Rafał Miłecki <zajec5@gmail.com> wrote: > From: Rafał Miłecki <rafal@milecki.pl> > > Fix code to check correct variable value. > > Reported-by: Abel Vesa <abel.vesa@nxp.com> > Fixes: 02f117134952 ("pinctrl: imx: prepare for making "group_names" in "function_desc" const") > Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Patch applied! > Linus: I'm not sure if you can rebase your tree. Treat it as separated > patch or fixup. Depending on how to manage your repository. Just applied it. It is usually nice to see this history. Yours, Linus Walleij
diff --git a/drivers/pinctrl/freescale/pinctrl-imx.c b/drivers/pinctrl/freescale/pinctrl-imx.c index 47b2ab1a14d0..16bc1bfc03e4 100644 --- a/drivers/pinctrl/freescale/pinctrl-imx.c +++ b/drivers/pinctrl/freescale/pinctrl-imx.c @@ -667,7 +667,7 @@ static int imx_pinctrl_parse_functions(struct device_node *np, group_names = devm_kcalloc(ipctl->dev, func->num_group_names, sizeof(char *), GFP_KERNEL); - if (!func->group_names) + if (!group_names) return -ENOMEM; for_each_child_of_node(np, child) group_names[i] = child->name;