From 507c82a6d6c4117235bedc96140d9ec558ba242a Mon Sep 17 00:00:00 2001 From: Charlie Fenton Date: Tue, 22 Jan 2013 00:44:24 -0800 Subject: [PATCH] OpenCL: remove dead code reported by Heinz-Bernd Eggenstein --- api/boinc_opencl.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/boinc_opencl.cpp b/api/boinc_opencl.cpp index 80b87a8373..a2763fca27 100644 --- a/api/boinc_opencl.cpp +++ b/api/boinc_opencl.cpp @@ -59,8 +59,9 @@ int get_vendor(cl_device_id device_id, char* vendor, int len) { retval = clGetDeviceInfo( device_id, CL_DEVICE_VENDOR, len, vendor, NULL ); - if ((retval != CL_SUCCESS) || (strlen(vendor)==0)) return retval; - + if (retval != CL_SUCCESS) return retval; + if (!strlen(vendor)) return CL_INVALID_DEVICE_TYPE; + if ((strstr(vendor, "AMD")) || (strstr(vendor, "Advanced Micro Devices, Inc.")) ) { @@ -75,7 +76,6 @@ int get_vendor(cl_device_id device_id, char* vendor, int len) { strcpy(vendor, GPU_TYPE_INTEL); // "intel_gpu" } - if (!strlen(vendor)) return CL_INVALID_DEVICE_TYPE; return 0; }