]> git.baikalelectronics.ru Git - kernel.git/commit
pinctrl: berlin: fix error return code of berlin_pinctrl_build_state()
authorMeng Tang <tangmeng@uniontech.com>
Thu, 3 Mar 2022 08:02:06 +0000 (16:02 +0800)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 15 Mar 2022 01:18:57 +0000 (02:18 +0100)
commit516fee5c2557b5ece5a63814649d74edd64fad3f
treeb9e4a0f7e3d3eae63baa43ff41a7ab41876efac4
parentd4df26e16fbaa64a89f8c8aa556b8297803a00e0
pinctrl: berlin: fix error return code of berlin_pinctrl_build_state()

When krealloc() fails and pctrl->functions is NULL, no error
return code of berlin_pinctrl_build_state() is assigned.
To fix this bug, ret is assigned with -ENOMEM when pctrl->functions
is NULL.

Signed-off-by: Meng Tang <tangmeng@uniontech.com>
Link: https://lore.kernel.org/r/20220303080206.16463-1-tangmeng@uniontech.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/berlin/berlin.c