From d72b8ef7d3bf78a65356cd742d10fc08e068bcc4 Mon Sep 17 00:00:00 2001 From: Sean Keely Date: Sat, 2 Oct 2021 02:06:29 -0500 Subject: [PATCH] Check errno for error type in hsaKmtAllocQueueGWS. Check errno rather than err and drop negation. Change-Id: I1804d67292c3b054eab8fc077c8e9b22a8cdcc9f [ROCm/ROCR-Runtime commit: 5e3983cb938f7e44f4bdd24300f4d9b736997146] --- projects/rocr-runtime/src/queues.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/projects/rocr-runtime/src/queues.c b/projects/rocr-runtime/src/queues.c index 51fc0bebd9..6a729b63ce 100644 --- a/projects/rocr-runtime/src/queues.c +++ b/projects/rocr-runtime/src/queues.c @@ -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;