drivers: sensor: fxls8974: remove redundant error check
The function fxls8974_get_temp_data always returns zero, indicating success.Therefore, the error checking if condition is unnecessary and can be removed. Signed-off-by: Tarang Raval <tarang.raval@siliconsignals.io>
This commit is contained in:
parent
9c7288e86e
commit
e338c7a807
1 changed files with 1 additions and 3 deletions
|
|
@ -379,9 +379,7 @@ static int fxls8974_channel_get(const struct device *dev,
|
|||
|
||||
val += FXLS8974_MAX_ACCEL_CHANNELS;
|
||||
|
||||
if (fxls8974_get_temp_data(dev, val)) {
|
||||
return -EIO;
|
||||
}
|
||||
return fxls8974_get_temp_data(dev, val);
|
||||
break;
|
||||
case SENSOR_CHAN_ACCEL_XYZ:
|
||||
return fxls8974_get_accel_data(dev, val, SENSOR_CHAN_ACCEL_XYZ);
|
||||
|
|
|
|||
Loading…
Reference in a new issue