OSDN Git Service

drm/mm/selftests: fix wrong return type casting
authorNirmoy Das <nirmoy.aiemd@gmail.com>
Mon, 22 Jun 2020 13:45:33 +0000 (15:45 +0200)
committerChristian König <christian.koenig@amd.com>
Tue, 23 Jun 2020 13:57:30 +0000 (15:57 +0200)
commitc9bb9d6685c0e8318c3a70fcdea319c84c94e5af
tree1f3efd85133758fd609bda38a64211d0e89657ba
parent5fad79fd66ff90b8c0a95319dad0b099008f8347
drm/mm/selftests: fix wrong return type casting

Function prepare_igt_frag() and get_insert_time() were casting
signed value to unsigned value before returning error.
So error check in igt_frag() would not work with unsigned
return value from get_insert_time() compared against negative
value.

Addresses-Coverity: ("Unsigned compared against 0, no effect")
Signed-off-by: Nirmoy Das <nirmoy.das@amd.com>
Reported-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/370636/
drivers/gpu/drm/selftests/test-drm_mm.c