Thread (37 messages) read the whole thread 37 messages, 6 authors, 2013-08-09

[PATCH v2 1/3] hwmon: (lm90) Add power control

From: Stephen Warren <hidden>
Date: 2013-08-08 18:45:34
Also in: linux-tegra, lkml

On 08/08/2013 11:59 AM, Guenter Roeck wrote:
On Thu, Aug 08, 2013 at 11:33:13AM -0600, Stephen Warren wrote:
quoted
On 08/08/2013 05:23 AM, Guenter Roeck wrote:
quoted
On 08/08/2013 02:47 AM, Wei Ni wrote:
...
quoted
quoted
I think get_regulator() will return error values, not only
-EPROBE_DEFER, so we should set data->lm90_reg to NULL to handle other
error values.
Matter of opinion if you want to check for IS_ERR or NULL later on.
No, if regulator returns either:

* Something valid
* Someting IS_ERR()

... then everywhere has to check the value using IS_ERR().

If regulator returns either:

* Something valid
* Someting NULL

... then everywhere has to check the value against NULL.
Other drivers calling get_regulator() don't check against NULL,
so it should not be needed here either.
Right I should have mentioned that I believe regulator falls into the
first valid-or-IS_ERR case, and not the second valid-or-NULL case.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help