[PATCH 2/5] ASoC: Intel: bdw-rt5677: fix module load/unload issues
Mark Brown
broonie at kernel.org
Tue Jun 23 11:37:07 CEST 2020
On Tue, Jun 23, 2020 at 11:40:11AM +0300, Andy Shevchenko wrote:
> On Mon, Jun 22, 2020 at 07:26:51PM +0100, Mark Brown wrote:
> > On Mon, Jun 22, 2020 at 01:23:04PM -0500, Pierre-Louis Bossart wrote:
> > > So I explicitly added a test for all possible cases. I don't mind removing
> > > the _OR_NULL if indeed it's safe, but showing this redundancy also shows an
> > > intent to deal with such cases.
> > Yeah, I think that's fine - it's perhaps redundant but we're not in a
> > hot path and as well as the intentionality it saves the reader from
> > having to know if gpiod_put() copes with NULL or not.
> What the point?
> We can document this instead of being a dead code, right?
To a certain extent the _OR_NULL is documentation - the effect is the
same with or without it.
> IS_ERR() may happen there only if we assign such pointer to be error. Is it possible case here?
That one is a bit more real.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20200623/85f58def/attachment.sig>
More information about the Alsa-devel
mailing list