mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 16:24:13 +08:00
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
Block a user