[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20160312062335.GZ3898@sirena.org.uk>
Date: Sat, 12 Mar 2016 13:23:35 +0700
From: Mark Brown <broonie@...nel.org>
To: Mihai Mihalache <mihai.d.mihalache@...el.com>
Cc: linux-kernel@...r.kernel.org, lgirdwood@...il.com,
hans.holmberg@...el.com, yousaf.kaukab@...el.com
Subject: Re: [PATCH v1] regulator: gpio: check return value of
of_get_named_gpio
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.
Download attachment "signature.asc" of type "application/pgp-signature" (474 bytes)
Powered by blists - more mailing lists