mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2026-05-08 10:28:04 +02:00
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>
This commit is contained in:
parent
fe4579e263
commit
6493860d70
1 changed files with 2 additions and 0 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue