Messages in this thread | ![/](/images/icornerl.gif) | | From | Arnd Bergmann <> | Subject | Re: [PATCH] reset: allow to pass NULL pointer to reset_control_put() | Date | Wed, 04 May 2016 14:35:01 +0200 |
| |
On Wednesday 04 May 2016 20:34:09 Masahiro Yamada wrote: > I thought about that a bit, > but there might be some (not nice) drivers that rely on the current behavior. > I did not want to break any boards with my patch. > > So, should it be > > if (!rstc) > return; > or, perhaps > > if (!rstc || WARN_ON_ONCE(IS_ERR(rstc))) > return;
I think the latter is fine, but it would also be good which of the six callers of the function actually rely on that behavior today, if any.
Arnd
| ![\](/images/icornerr.gif) |