Commit 1f7b8eae authored by Marek Szyprowski's avatar Marek Szyprowski Committed by Linus Walleij

pinctrl: samsung: Fix samsung_pinctrl_create_functions return value

Return proper error code in case of memory allocation failure.
Signed-off-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: default avatarKrzysztof Kozlowski <krzk@kernel.org>
Acked-by: default avatarTomasz Figa <tomasz.figa@gmail.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent fa5c0f46
......@@ -751,7 +751,7 @@ static struct samsung_pmx_func *samsung_pinctrl_create_functions(
functions = devm_kzalloc(dev, func_cnt * sizeof(*functions),
GFP_KERNEL);
if (!functions)
return ERR_PTR(-EINVAL);
return ERR_PTR(-ENOMEM);
func = functions;
/*
......
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