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
parent
fe4579e263
commit
6493860d70
|
@ -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,
|
int amdgpu_query_gpu_info(amdgpu_device_handle dev,
|
||||||
struct amdgpu_gpu_info *info)
|
struct amdgpu_gpu_info *info)
|
||||||
{
|
{
|
||||||
|
if ((dev == NULL) || (info == NULL))
|
||||||
|
return -EINVAL;
|
||||||
/* Get ASIC info*/
|
/* Get ASIC info*/
|
||||||
*info = dev->info;
|
*info = dev->info;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue