mirror of
https://github.com/torvalds/linux.git
synced 2026-11-27 08:52:27 +00:00
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 <[email protected]> Acked-by: Patrice Chotard <[email protected]> Acked-by: Thierry Reding <[email protected]> Acked-by: Heiko Stuebner <[email protected]> Tested-by: Mika Westerberg <[email protected]> Acked-by: Mika Westerberg <[email protected]> Acked-by: Lee Jones <[email protected]> Acked-by: Sören Brinkmann <[email protected]> Acked-by: Laurent Pinchart <[email protected]> Acked-by: Ray Jui <[email protected]> Acked-by: Antoine Tenart <[email protected]> Acked-by: Hongzhou Yang <[email protected]> Acked-by: Wei Chen <[email protected]> Signed-off-by: Linus Walleij <[email protected]>