Skip to content

Commit 4d2d85b

Browse files
committed
return false if aptina or onsemi is not detected
1 parent 2af6d90 commit 4d2d85b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/sensors.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ static int detect_onsemi_sensor(sensor_ctx_t *ctx, int fd,
435435
case 0xffffffff:
436436
case 0xffff:
437437
// no response
438-
break;
438+
return false;
439439
default:
440440
break;
441441
}
@@ -961,7 +961,7 @@ static int detect_visemi_sensor(sensor_ctx_t *ctx, int fd,
961961
case 0xffffffff:
962962
case 0xffff:
963963
// no response
964-
break;
964+
return false;
965965
default:
966966
SENSOR_ERR("ViSemi", res);
967967
return false;

0 commit comments

Comments
 (0)