|
@@ -291,15 +291,15 @@ int cros_ec_sensors_read_lpc(struct iio_dev *indio_dev,
|
|
return -EIO;
|
|
return -EIO;
|
|
|
|
|
|
/* Read status byte until EC is not busy. */
|
|
/* Read status byte until EC is not busy. */
|
|
- status = cros_ec_sensors_read_until_not_busy(st);
|
|
|
|
- if (status < 0)
|
|
|
|
- return status;
|
|
|
|
|
|
+ ret = cros_ec_sensors_read_until_not_busy(st);
|
|
|
|
+ if (ret < 0)
|
|
|
|
+ return ret;
|
|
|
|
|
|
/*
|
|
/*
|
|
* Store the current sample id so that we can compare to the
|
|
* Store the current sample id so that we can compare to the
|
|
* sample id after reading the data.
|
|
* sample id after reading the data.
|
|
*/
|
|
*/
|
|
- samp_id = status & EC_MEMMAP_ACC_STATUS_SAMPLE_ID_MASK;
|
|
|
|
|
|
+ samp_id = ret & EC_MEMMAP_ACC_STATUS_SAMPLE_ID_MASK;
|
|
|
|
|
|
/* Read all EC data, format it, and store it into data. */
|
|
/* Read all EC data, format it, and store it into data. */
|
|
ret = cros_ec_sensors_read_data_unsafe(indio_dev, scan_mask,
|
|
ret = cros_ec_sensors_read_data_unsafe(indio_dev, scan_mask,
|