> 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 ;)