Skip to content
Commit 323de9ef authored by Masahiro Yamada's avatar Masahiro Yamada Committed by Linus Walleij
Browse files

pinctrl: make pinctrl_register() return proper error code



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: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: default avatarPatrice Chotard <patrice.chotard@st.com>
Acked-by: default avatarThierry Reding <treding@nvidia.com>
Acked-by: default avatarHeiko Stuebner <heiko@sntech.de>
Tested-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: default avatarLee Jones <lee@kernel.org>
Acked-by: default avatarSören Brinkmann <soren.brinkmann@xilinx.com>
Acked-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: default avatarRay Jui <rjui@broadcom.com>
Acked-by: default avatarAntoine Tenart <antoine.tenart@free-electrons.com>
Acked-by: default avatarHongzhou Yang <hongzhou.yang@mediatek.com>
Acked-by: default avatarWei Chen <Wei.Chen@csr.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent e73ac02d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment