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: zephyrproject-rtos/zephyr#90558
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This commit is contained in:
Benjamin Cabé 2025-05-28 11:17:24 +02:00 committed by Benjamin Cabé
commit fdf713ab51

View file

@ -176,10 +176,6 @@ static int icp101xx_channel_get(const struct device *dev, enum sensor_channel ch
val->val1 = 0;
val->val2 = 0;
if (!((chan == SENSOR_CHAN_AMBIENT_TEMP) || (chan == SENSOR_CHAN_PRESS) ||
(chan == SENSOR_CHAN_ALTITUDE))) {
return -ENOTSUP;
}
/* Zephyr expects kPa while ICP101xx returns Pa */
if (chan == SENSOR_CHAN_AMBIENT_TEMP) {
#ifdef ICP101XX_DRV_USE_FLOATS