vblank: interval should be greater than 0 05/171005/2
authorBoram Park <boram1288.park@samsung.com>
Sun, 25 Feb 2018 22:54:28 +0000 (07:54 +0900)
committerBoram Park <boram1288.park@samsung.com>
Sun, 25 Feb 2018 23:27:57 +0000 (08:27 +0900)
Change-Id: I69108d7b81fd14f22d6e9f5d7fecfcf28dd3623e

src/tdm_vblank.c

index 19c8024..0362d4e 100644 (file)
@@ -1482,6 +1482,7 @@ tdm_vblank_wait(tdm_vblank *vblank, unsigned int req_sec, unsigned int req_usec,
 
        TDM_RETURN_VAL_IF_FAIL(tdm_vblank_is_valid(vblank), TDM_ERROR_INVALID_PARAMETER);
        TDM_RETURN_VAL_IF_FAIL(func != NULL, TDM_ERROR_INVALID_PARAMETER);
+       TDM_RETURN_VAL_IF_FAIL(interval > 0, TDM_ERROR_INVALID_PARAMETER);
 
        if (private_vblank->in_create_handler) {
                TDM_ERR("NOT allowed to be called in a create handler");