Commit aa63e656 authored by Rafał Miłecki's avatar Rafał Miłecki Committed by Linus Walleij

pinctrl: imx: fix allocation result check

Fix code to check correct variable value.
Reported-by: default avatarAbel Vesa <abel.vesa@nxp.com>
Fixes: 02f11713 ("pinctrl: imx: prepare for making "group_names" in "function_desc" const")
Signed-off-by: default avatarRafał Miłecki <rafal@milecki.pl>
Reviewed-by: default avatarAbel Vesa <abel.vesa@nxp.com>
Link: https://lore.kernel.org/r/20211222212807.27122-1-zajec5@gmail.comSigned-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent ce852837
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment