[PATCH] pinctrl: imx: fix allocation result check
Rafał Miłecki
zajec5 at gmail.com
Wed Dec 22 13:28:07 PST 2021
From: Rafał Miłecki <rafal at milecki.pl>
Fix code to check correct variable value.
Reported-by: Abel Vesa <abel.vesa at nxp.com>
Fixes: 02f117134952 ("pinctrl: imx: prepare for making "group_names" in "function_desc" const")
Signed-off-by: Rafał Miłecki <rafal at 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
More information about the linux-arm-kernel
mailing list