Check errno for error type in hsaKmtAllocQueueGWS.

Check errno rather than err and drop negation.

Change-Id: I1804d67292c3b054eab8fc077c8e9b22a8cdcc9f


[ROCm/ROCR-Runtime commit: 5e3983cb93]
This commit is contained in:
Sean Keely
2021-10-02 02:06:29 -05:00
parent fe5fee87f3
commit d72b8ef7d3
+3 -3
View File
@@ -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;