11.05.2022 12:40, Shreeya Patel пишет: > +static int ltrf216a_get_lux(struct ltrf216a_data *data) > +{ > + int greendata, cleardata; > + u64 lux, div; > + > + greendata = ltrf216a_read_data(data, LTRF216A_ALS_DATA_0); > + cleardata = ltrf216a_read_data(data, LTRF216A_CLEAR_DATA_0); > + > + if (greendata < 0 || cleardata < 0) > + return -EINVAL; -EIO should be more appropriate error code here