amdgpu: check parameters in amdgpu_query_gpu_info

Make sure they aren't NULL.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=97993

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
main
Alex Deucher 2016-10-28 16:56:13 -04:00
parent fe4579e263
commit 6493860d70
1 changed files with 2 additions and 0 deletions

View File

@ -230,6 +230,8 @@ drm_private int amdgpu_query_gpu_info_init(amdgpu_device_handle dev)
int amdgpu_query_gpu_info(amdgpu_device_handle dev,
struct amdgpu_gpu_info *info)
{
if ((dev == NULL) || (info == NULL))
return -EINVAL;
/* Get ASIC info*/
*info = dev->info;