summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/samsung/pinctrl-samsung.c
diff options
context:
space:
mode:
authorMarek Szyprowski <m.szyprowski@samsung.com>2017-01-19 14:48:46 +0100
committerLinus Walleij <linus.walleij@linaro.org>2017-01-26 10:05:54 +0100
commit1f7b8eae5c16e6b16c6467ac8e96d0af9c9de81e (patch)
treed7a9a0454e3ac94fbedb0659c73ebdda0de384a7 /drivers/pinctrl/samsung/pinctrl-samsung.c
parentpinctrl: samsung: Remove messages for failed memory allocation (diff)
downloadlinux-1f7b8eae5c16e6b16c6467ac8e96d0af9c9de81e.tar.xz
linux-1f7b8eae5c16e6b16c6467ac8e96d0af9c9de81e.zip
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>
Diffstat (limited to 'drivers/pinctrl/samsung/pinctrl-samsung.c')
-rw-r--r--drivers/pinctrl/samsung/pinctrl-samsung.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pinctrl/samsung/pinctrl-samsung.c b/drivers/pinctrl/samsung/pinctrl-samsung.c
index b11e67e85460..10b3fd826231 100644
--- a/drivers/pinctrl/samsung/pinctrl-samsung.c
+++ b/drivers/pinctrl/samsung/pinctrl-samsung.c
@@ -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;
/*