amdgcn: Check HSA return codes [PR94629]
authorAndrew Stubbs <ams@codesourcery.com>
Mon, 20 Apr 2020 14:25:31 +0000 (15:25 +0100)
committerAndrew Stubbs <ams@codesourcery.com>
Thu, 23 Apr 2020 14:05:23 +0000 (15:05 +0100)
commit966de09be91c639d66d252c9ae6ab8da5ebfca18
treece0d4fc53f0913505e6212d3570deea88d854c81
parent744b3e4478df83f54543964b8eb7250eb9bb6d40
amdgcn: Check HSA return codes [PR94629]

Ensure that the returned status values are not ignored.  The old code was
not broken, but this is both safer and satisfies static analysis.

2020-04-23  Andrew Stubbs  <ams@codesourcery.com>

PR other/94629

libgomp/
* plugin/plugin-gcn.c (init_hsa_context): Check return value from
hsa_iterate_agents.
(GOMP_OFFLOAD_init_device): Check return values from both calls to
hsa_agent_iterate_regions.
libgomp/ChangeLog
libgomp/plugin/plugin-gcn.c