summaryrefslogtreecommitdiff
path: root/libgomp/plugin/plugin-gcn.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgomp/plugin/plugin-gcn.c')
-rw-r--r--libgomp/plugin/plugin-gcn.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libgomp/plugin/plugin-gcn.c b/libgomp/plugin/plugin-gcn.c
index bf6ad371ea2..f805206852d 100644
--- a/libgomp/plugin/plugin-gcn.c
+++ b/libgomp/plugin/plugin-gcn.c
@@ -3316,6 +3316,9 @@ GOMP_OFFLOAD_get_name (void)
return "gcn";
}
+/* Return the UID; if not available return NULL.
+ Returns freshly allocated memoy. */
+
const char *
GOMP_OFFLOAD_get_uid (int ord)
{
@@ -3328,7 +3331,10 @@ GOMP_OFFLOAD_get_uid (int ord)
status = hsa_fns.hsa_agent_get_info_fn (agent->id, HSA_AMD_AGENT_INFO_UUID,
str);
if (status != HSA_STATUS_SUCCESS)
- hsa_fatal ("Could not obtain device UUID", status);
+ {
+ free (str);
+ return NULL;
+ }
return str;
}