Skip to content

Commit aa63e65

Browse files
Rafał MiłeckiLinus Walleij
authored andcommitted
pinctrl: imx: fix allocation result check
Fix code to check correct variable value. Reported-by: Abel Vesa <abel.vesa@nxp.com> Fixes: 02f1171 ("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>
1 parent ce85283 commit aa63e65

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/pinctrl/freescale/pinctrl-imx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ static int imx_pinctrl_parse_functions(struct device_node *np,
667667

668668
group_names = devm_kcalloc(ipctl->dev, func->num_group_names,
669669
sizeof(char *), GFP_KERNEL);
670-
if (!func->group_names)
670+
if (!group_names)
671671
return -ENOMEM;
672672
for_each_child_of_node(np, child)
673673
group_names[i] = child->name;

0 commit comments

Comments
 (0)