From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754063AbcCMIfC (ORCPT ); Sun, 13 Mar 2016 04:35:02 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:56594 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754023AbcCMIeq (ORCPT ); Sun, 13 Mar 2016 04:34:46 -0400 Date: Sat, 12 Mar 2016 13:23:35 +0700 From: Mark Brown To: Mihai Mihalache Cc: linux-kernel@vger.kernel.org, lgirdwood@gmail.com, hans.holmberg@intel.com, yousaf.kaukab@intel.com Message-ID: <20160312062335.GZ3898@sirena.org.uk> References: <1457604299-6091-1-git-send-email-mihai.d.mihalache@intel.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="lKbk9CFItQTD29wm" Content-Disposition: inline In-Reply-To: <1457604299-6091-1-git-send-email-mihai.d.mihalache@intel.com> X-Cookie: Do not flush. User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: 94.175.94.161 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [PATCH v1] regulator: gpio: check return value of of_get_named_gpio X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mezzanine.sirena.org.uk) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --lKbk9CFItQTD29wm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Mar 10, 2016 at 02:04:59AM -0800, Mihai Mihalache wrote: > config->enable_gpio = of_get_named_gpio(np, "enable-gpio", 0); > + if (IS_ERR_VALUE(config->enable_gpio)) > + return ERR_PTR(config->enable_gpio); This is an incompatible behaviour change. enable-gpio is an optional property, we check later if we got a valid GPIO and happily continue if we didn't. The driver should instead explicitly check for -EPROBE_DEFER and handle that case separately, allowing the device to probe in cases where the GPIO is just not provided. --lKbk9CFItQTD29wm Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJW47XlAAoJECTWi3JdVIfQKEkH+wSuT4M7sZowva70euwjykyG azuOeaFEoGJwTpJ6y6DR5UqTQmy+GIV0JxjfL/fu5lCY83hIrNh7bu9e4cGJCCzH MQRtQcJ26TzIBOYH5hHzUgg/I59hzFPEVkoDspBVn/n+YHFWmU/hJt8XNydeiuDk 9hCavHd3uXmvqQP64tH+7g//Bf+AB57C+M13vmrdHzqHdRn1he3OWSWvxTSaIwmE cqkcoQkkLiPsJyOk/2E4gXusq0p8RJH4h3OGyK1GvoWsZ+U8SfHEEOe5epxq7V0W 7cR17/WAiSZXK+MKJ0YhZNUfk1EVxHfdo5jvNoVzR74E4xLIE8gfFCb1aqccjCs= =WfNv -----END PGP SIGNATURE----- --lKbk9CFItQTD29wm--