Re: [PATCH] reset: allow to pass NULL pointer to reset_control_put()
From: Arnd Bergmann
Date: Wed May 04 2016 - 08:35:25 EST
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