lkml.org 
[lkml]   [2016]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2016-03-13 10:21    [W:0.037 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site