Improve the return value for hsaKmtOpenKFD()
When KFD is already opened, Opening it again should return HSAKMT_STATUS_KERNEL_ALREADY_OPENED to align with the specification. Change-Id: Ib10a2d2c48781600bea7d072557d03ccb1a2bc19 Signed-off-by: Yong Zhao <yong.zhao@amd.com>
This commit is contained in:
+1
-1
@@ -146,7 +146,7 @@ HSAKMT_STATUS HSAKMTAPI hsaKmtOpenKFD(void)
|
||||
init_counter_props(sys_props.NumNodes);
|
||||
} else {
|
||||
kfd_open_count++;
|
||||
result = HSAKMT_STATUS_SUCCESS;
|
||||
result = HSAKMT_STATUS_KERNEL_ALREADY_OPENED;
|
||||
}
|
||||
|
||||
pthread_mutex_unlock(&hsakmt_mutex);
|
||||
|
||||
Reference in New Issue
Block a user