Skip to content

Commit fdf713a

Browse files
committed
drivers: sensor: icp101xx: update channel check condition
Removed a logically dead else by doing sensor channel check in a way that's more aligned with how other drivers do it. Fixes: CID 505949 Fixes: #90558 Signed-off-by: Benjamin Cabé <[email protected]>
1 parent b668e9d commit fdf713a

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

drivers/sensor/tdk/icp101xx/icp101xx_drv.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,6 @@ static int icp101xx_channel_get(const struct device *dev, enum sensor_channel ch
176176
val->val1 = 0;
177177
val->val2 = 0;
178178

179-
if (!((chan == SENSOR_CHAN_AMBIENT_TEMP) || (chan == SENSOR_CHAN_PRESS) ||
180-
(chan == SENSOR_CHAN_ALTITUDE))) {
181-
return -ENOTSUP;
182-
}
183179
/* Zephyr expects kPa while ICP101xx returns Pa */
184180
if (chan == SENSOR_CHAN_AMBIENT_TEMP) {
185181
#ifdef ICP101XX_DRV_USE_FLOATS

0 commit comments

Comments
 (0)