[PATCH] pinctrl: make pinctrl_register() return proper error code

Linus Walleij linus.walleij at linaro.org
Wed Jun 10 05:52:30 PDT 2015


On Tue, Jun 9, 2015 at 6:01 AM, Masahiro Yamada
<yamada.masahiro at socionext.com> wrote:

> Currently, pinctrl_register() just returns NULL on error, so the
> callers can not know the exact reason of the failure.
>
> Some of the pinctrl drivers return -EINVAL, some -ENODEV, and some
> -ENOMEM on error of pinctrl_register(), although the error code
> might be different from the real cause of the error.
>
> This commit reworks pinctrl_register() to return the appropriate
> error code and modifies all of the pinctrl drivers to use IS_ERR()
> for the error checking and PTR_ERR() for getting the error code.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro at socionext.com>

Patch applied, with the ACK-storm.

Yours,
Linus Walleij



More information about the Linux-mediatek mailing list