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:
parent
b668e9de40
commit
fdf713ab51
1 changed files with 0 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue