mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-05 16:37:50 +00:00
pinctrl: imx: fix allocation result check
Fix code to check correct variable value.
Reported-by: Abel Vesa <abel.vesa@nxp.com>
Fixes: 02f1171349
("pinctrl: imx: prepare for making "group_names" in "function_desc" const")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Reviewed-by: Abel Vesa <abel.vesa@nxp.com>
Link: https://lore.kernel.org/r/20211222212807.27122-1-zajec5@gmail.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
ce85283733
commit
aa63e6562a
1 changed files with 1 additions and 1 deletions
|
@ -667,7 +667,7 @@ static int imx_pinctrl_parse_functions(struct device_node *np,
|
||||||
|
|
||||||
group_names = devm_kcalloc(ipctl->dev, func->num_group_names,
|
group_names = devm_kcalloc(ipctl->dev, func->num_group_names,
|
||||||
sizeof(char *), GFP_KERNEL);
|
sizeof(char *), GFP_KERNEL);
|
||||||
if (!func->group_names)
|
if (!group_names)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
for_each_child_of_node(np, child)
|
for_each_child_of_node(np, child)
|
||||||
group_names[i] = child->name;
|
group_names[i] = child->name;
|
||||||
|
|
Loading…
Reference in a new issue