As bytes_read can contain an error condition under some circumstances, in which we want to error out. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@xxxxxxxxxxxxx> --- lib/igt_debugfs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c index d828687a62ca..b1b67e740041 100644 --- a/lib/igt_debugfs.c +++ b/lib/igt_debugfs.c @@ -601,6 +601,7 @@ static int read_crc(igt_pipe_crc_t *pipe_crc, igt_crc_t *out) igt_assert(pipe_crc->flags & O_NONBLOCK); bytes_read = 0; } + igt_assert_lte(0, bytes_read); buf[bytes_read] = '\0'; if (bytes_read && !pipe_crc_init_from_string(pipe_crc, out, buf)) -- 2.9.3 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx