vblank: offset should be greater than 0 13/171013/1
authorBoram Park <boram1288.park@samsung.com>
Sun, 25 Feb 2018 23:30:24 +0000 (08:30 +0900)
committerBoram Park <boram1288.park@samsung.com>
Sun, 25 Feb 2018 23:30:37 +0000 (08:30 +0900)
Change-Id: Iee03c0b17b51f8a35c844b5d4f6581ada167d8eb

src/tdm_vblank.c

index 0362d4eef060f07d452ce0bca884b1380ef3ad16..bdcad07a36e25f41558ee97f7c0cbf4e762e0fb9 100644 (file)
@@ -980,6 +980,7 @@ tdm_vblank_set_offset(tdm_vblank *vblank, int offset)
        tdm_private_vblank *private_vblank = vblank;
 
        TDM_RETURN_VAL_IF_FAIL(tdm_vblank_is_valid(vblank), TDM_ERROR_INVALID_PARAMETER);
+       TDM_RETURN_VAL_IF_FAIL(offset >= 0, TDM_ERROR_INVALID_PARAMETER);
 
        if (private_vblank->offset == offset)
                return TDM_ERROR_NONE;