From e5b6c0a6655d64b9c8eb02462bede360c80304b0 Mon Sep 17 00:00:00 2001 From: Koop Mast Date: Tue, 3 Feb 2015 23:13:23 +0100 Subject: [PATCH 1/2] After GPU checks, return if no supported GPU is found. Because ret will be NULL. The code after this point assumes ret is populated. --- src/cl_device_id.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/cl_device_id.c b/src/cl_device_id.c index 9d83ab2..65c86c5 100644 --- a/src/cl_device_id.c +++ b/src/cl_device_id.c @@ -505,6 +505,10 @@ skl_gt4_break: } } + /* No supported GPU found */ + if (ret == NULL) + return ret; + #ifdef HAS_USERPTR cl_driver dummy = cl_driver_new(NULL); cl_buffer_mgr bufmgr = cl_driver_get_bufmgr(dummy); -- 2.2.2