pinctrl: samsung: Fix samsung_pinctrl_create_functions return value

Return proper error code in case of memory allocation failure.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Tomasz Figa <tomasz.figa@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
Marek Szyprowski 2017-01-19 14:48:46 +01:00 committed by Linus Walleij
parent fa5c0f46e2
commit 1f7b8eae5c
1 changed files with 1 additions and 1 deletions

View File

@ -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;
/*