diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2021-12-22 22:28:07 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2021-12-26 04:19:23 +0100 |
commit | aa63e6562ab38f838fd7e3e5d6708495dd144c05 (patch) | |
tree | 82579aa1b5f05db149fe59c2b0d86cf1e3f91644 /drivers/pinctrl/freescale | |
parent | ce852837335abc874e4d943ebbbe7432465a413b (diff) |
pinctrl: imx: fix allocation result check
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>
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>
Diffstat (limited to 'drivers/pinctrl/freescale')
-rw-r--r-- | drivers/pinctrl/freescale/pinctrl-imx.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |