lkml.org 
[lkml]   [2017]   [Jun]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 03/17] mfd: madera: Add common support for Cirrus Logic Madera codecs
From
Date
On Mon, 2017-06-05 at 11:32 +0100, Lee Jones wrote:
> On Fri, 02 Jun 2017, Richard Fitzgerald wrote:
[]
> > if (IS_ERR(madera->reset_gpio))
> > + ret = PTR_ERR(madera->reset_gpio);
> > + else
> > + ret = 0;
>
> If you pre-initialise ret, you can drop the else.

Better to use:

ret = PTR_ERR_OR_ZERO(madera->reset_gpio);

\
 
 \ /
  Last update: 2017-06-12 00:20    [W:0.292 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site