Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1394251

Re: [PATCH] reset: allow to pass NULL pointer to reset_control_put()

From Arnd Bergmann <arnd@arndb.de>
Newsgroups linux.kernel
Subject Re: [PATCH] reset: allow to pass NULL pointer to reset_control_put()
Date 2016-05-04 14:40 +0200
Message-ID <rv4fW-3Mb-53@gated-at.bofh.it> (permalink)
References <rv30v-2OD-29@gated-at.bofh.it> <rv3aa-2T5-15@gated-at.bofh.it> <rv3jQ-2ZG-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

[PATCH] reset: allow to pass NULL pointer to reset_control_put() Masahiro Yamada <yamada.masahiro@socionext.com> - 2016-05-04 13:20 +0200
  Re: [PATCH] reset: allow to pass NULL pointer to reset_control_put() Arnd Bergmann <arnd@arndb.de> - 2016-05-04 13:30 +0200
    Re: [PATCH] reset: allow to pass NULL pointer to reset_control_put() Masahiro Yamada <yamada.masahiro@socionext.com> - 2016-05-04 13:40 +0200
      Re: [PATCH] reset: allow to pass NULL pointer to reset_control_put() Philipp Zabel <p.zabel@pengutronix.de> - 2016-05-04 14:40 +0200
        Re: [PATCH] reset: allow to pass NULL pointer to reset_control_put() Arnd Bergmann <arnd@arndb.de> - 2016-05-04 14:50 +0200
      Re: [PATCH] reset: allow to pass NULL pointer to reset_control_put() Arnd Bergmann <arnd@arndb.de> - 2016-05-04 14:40 +0200

csiph-web