Skip to content
Commit ca6fcfa8 authored by Tom Rix's avatar Tom Rix Committed by Alex Deucher
Browse files

drm/amdgpu: Fix realloc of ptr



Clang static analysis reports this error
amdgpu_debugfs.c:1690:9: warning: 1st function call
  argument is an uninitialized value
  tmp = krealloc_array(tmp, i + 1,
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~

realloc uses tmp, so tmp can not be garbage.
And the return needs to be checked.

Fixes: 5ce5a584 ("drm/amdgpu: add debugfs for reset registers list")
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarTom Rix <trix@redhat.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 4affb123
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment