]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit4cff27efffd2ea73eeb013e853f4b28fba9706f5
tree1f3efd85133758fd609bda38a64211d0e89657ba
parent98eae48be9272dab32baade55cd7135679b744cb
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