Check errno for error type in hsaKmtAllocQueueGWS.

Check errno rather than err and drop negation.

Change-Id: I1804d67292c3b054eab8fc077c8e9b22a8cdcc9f


[ROCm/ROCR-Runtime commit: 5e3983cb93]
这个提交包含在:
Sean Keely 于 2021-10-06 15:08:28 -04:00 提交
1 父节点 fe5fee87f3
当前提交 d72b8ef7d3
1 个文件已更改
+3 -3
+3 -3
查看文件
@@ -776,11 +776,11 @@ hsaKmtAllocQueueGWS(
if (!err)
return HSAKMT_STATUS_SUCCESS;
else if (err == -EINVAL)
else if (errno == EINVAL)
return HSAKMT_STATUS_INVALID_PARAMETER;
else if (err == -EBUSY)
else if (errno == EBUSY)
return HSAKMT_STATUS_OUT_OF_RESOURCES;
else if (err == -ENODEV)
else if (errno == ENODEV)
return HSAKMT_STATUS_NOT_SUPPORTED;
else
return HSAKMT_STATUS_ERROR;