pinctrl: samsung: Fix samsung_pinctrl_create_functions return value

Return proper error code in case of memory allocation failure.

Signed-off-by: Marek Szyprowski <[email protected]>
Reviewed-by: Krzysztof Kozlowski <[email protected]>
Acked-by: Tomasz Figa <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
This commit is contained in:
Marek Szyprowski 2017-01-19 14:48:46 +01:00 • committed by Linus Walleij
commit 1f7b8eae5c

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