From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lee Jones Subject: Re: [PATCH] pinctrl: make pinctrl_register() return proper error code Date: Tue, 9 Jun 2015 10:52:41 +0100 Message-ID: <20150609095241.GO2982@x1> References: <1433822476-26531-1-git-send-email-yamada.masahiro@socionext.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1433822476-26531-1-git-send-email-yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+glpam-linux-mediatek=m.gmane.org-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org To: Masahiro Yamada Cc: Alessandro Rubini , Krzysztof Kozlowski , Maoguang Meng , Heiko Stuebner , Stephen Warren , linux-sh-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Linus Walleij , Jason Uy , Tomasz Figa , Stefan Agner , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Heikki Krogerus , Laurent Pinchart , Chaotian Jing , kernel-F5mvAk5X5gdBDgjK7y7TUQ@public.gmane.org, Alexandre Courbot , linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Axel Lin , linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, Rickard Strandqvist , Hongzhou Yang , Varka Bhadram List-Id: linux-gpio@vger.kernel.org On Tue, 09 Jun 2015, Masahiro Yamada 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 > --- > > This patch is based on linux-pinctrl/devel > (Commit 7164873e7c69d6bab74726debc3b495a86332b1f). > > I think I converted all of the pinctrl drivers, but just in case, > I'd like the driver maintainers to check this patch out. > > drivers/pinctrl/bcm/pinctrl-bcm2835.c | 4 ++-- Acked-by: Lee Jones