Skip to content

Commit 64a58fa

Browse files
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 <[email protected]>
1 parent c50777a commit 64a58fa

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/sensor/nxp/fxls8974/fxls8974.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -379,9 +379,8 @@ static int fxls8974_channel_get(const struct device *dev,
379379

380380
val += FXLS8974_MAX_ACCEL_CHANNELS;
381381

382-
if (fxls8974_get_temp_data(dev, val)) {
383-
return -EIO;
384-
}
382+
return fxls8974_get_temp_data(dev, val);
383+
385384
break;
386385
case SENSOR_CHAN_ACCEL_XYZ:
387386
return fxls8974_get_accel_data(dev, val, SENSOR_CHAN_ACCEL_XYZ);

0 commit comments

Comments
 (0)