Re: [PATCH 2/2] iio: chemical: Add Senseair Sunrise 006-0-007 driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Ack
> 
> > > +			ret = sunrise_read_co2_filtered(client, &co2);
> > > +			*val = co2;
> > > +			mutex_unlock(&sunrise->lock);
> > > +
> > > +			return ret ? ret : IIO_VAL_INT;  
> >
> > Can be written as
> >
> > 			return ret ?: IIO_VAL_INT;
> >
> > but up to maintainers.
> >  
> 
> You know I never saw this syntax before ? :D
> I'll use it!
I'm rather late to the party, but I'd keep all error handling in driver of the form

	if (ret)
		return ret;

	return IIO_VAL_INT;

That means lazy reviewers like me have one less thing to think about ;)







[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux