v4l2-compliance: fix timings_cap test.
authorHans Verkuil <hans.verkuil@cisco.com>
Mon, 16 Jul 2012 13:50:46 +0000 (15:50 +0200)
committerHans Verkuil <hans.verkuil@cisco.com>
Mon, 16 Jul 2012 13:50:46 +0000 (15:50 +0200)
If the driver doesn't implement VIDIOC_DV_TIMINGS_CAP, then this test
failed when it should have returned OK.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
utils/v4l2-compliance/v4l2-test-io-config.cpp

index 22cf4d4..09e2dc4 100644 (file)
@@ -323,6 +323,8 @@ static int checkTimingsCap(struct node *node, bool has_timings)
                return fail("TIMINGS cap set, but could not get timings caps\n");
        if (!ret && !has_timings)
                return fail("TIMINGS cap not set, but could still get timings caps\n");
+       if (ret && !has_timings)
+               return 0;
        if (check_0(timingscap.reserved, sizeof(timingscap.reserved)))
                return fail("reserved not zeroed\n");
        fail_on_test(timingscap.type != V4L2_DV_BT_656_1120);