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:
Tarang Raval 2024-11-12 10:54:34 +05:30 committed by Benjamin Cabé
parent 9c7288e86e
commit e338c7a807

View file

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