fixed error output for hipDeviceGetAttribute

Change-Id: I1e343a4e4e20e1a550d419f701cc1e60e9d03af4
This commit is contained in:
Aditya Atluri
2016-11-21 18:07:01 -06:00
parent d6ad91ffa4
commit 7145ea6a4a
+3 -4
View File
@@ -174,7 +174,9 @@ hipError_t hipDeviceGetAttribute(int* pi, hipDeviceAttribute_t attr, int device)
hipError_t e = hipSuccess;
if(pi != nullptr) {
if(pi == nullptr) {
return ihipLogStatus(hipErrorInvalidValue);
}
auto * hipDevice = ihipGetDevice(device);
hipDeviceProp_t *prop = &hipDevice->_props;
@@ -236,9 +238,6 @@ hipError_t hipDeviceGetAttribute(int* pi, hipDeviceAttribute_t attr, int device)
} else {
e = hipErrorInvalidDevice;
}
}else{
e = hipErrorInvalidDevice;
}
return ihipLogStatus(e);
}