cl: Don't use device_infos if num_device_infos == 0
commitb8d64223261bab4305fdc940fb25229dc0e2cbd6
authorMichel Dänzer <mdaenzer@redhat.com>
Thu, 3 Oct 2024 15:33:56 +0000 (3 17:33 +0200)
committerMarge Bot <emma+marge@anholt.net>
Tue, 15 Oct 2024 16:20:24 +0000 (15 16:20 +0000)
treeb49714ef54a3dba2f44e1baf167273f13c528bc6
parent7ce69da1199d12ed0ddaa251ed489750523798fb
cl: Don't use device_infos if num_device_infos == 0

valgrind pointed me to this, after I got seemingly random fails.

Fixes: 4f2016b2d9f3 ("cl: clGetDeviceInfo check returned values")
Part-of: <https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/959>
tests/cl/api/get-device-info.c