Re: [PATCH 03/10] iio: accel: adxl367: Use automated cleanup for locks and iio direct mode.

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

 



> > -out:
> > -	mutex_unlock(&st->lock);
> > +		ret = adxl367_set_measure_en(st, true);
> > +		if (ret)
> > +			return ret;
> >  
> > -	iio_device_release_direct_mode(indio_dev);
> > +		st->range = range;
> >  
> > -	return ret;
> > +		return 0;
> > +	}
> > +	unreachable();
> >  }  
> 
> I do agree this is irritating. Personally I would prefer to return 0 (or the
> last ret value) instead of the unusual unreachable() builtin. But that's me :)
Definitely would be an error, not 0 or ret, but I'm still in two minds about this
in general.  I think I'll go with unreachable for now and see if we get an
push back.
> 
> 
> - Nuno Sá






[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