Skip to content

Commit

Permalink
drivers: sensor: fxls8974: remove redundant error check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Siliconsignals authored and kartben committed Jan 17, 2025
1 parent 9c7288e commit e338c7a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/sensor/nxp/fxls8974/fxls8974.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e338c7a

Please sign in to comment.