OpenCL: remove dead code reported by Heinz-Bernd Eggenstein

This commit is contained in:
Charlie Fenton 2013-01-22 00:44:24 -08:00 committed by Oliver Bock
parent c2e77a0515
commit 507c82a6d6
1 changed files with 3 additions and 3 deletions

View File

@ -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;
}