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:
parent
fa5c0f46e2
commit
1f7b8eae5c
|
@ -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;
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue