]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/pm: initialize variable
authorTom Rix <trix@redhat.com>
Fri, 30 Apr 2021 17:16:54 +0000 (10:16 -0700)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 4 May 2021 21:38:05 +0000 (17:38 -0400)
commit555b31848c1edab93e2fea9d5f50f83b4230fff2
tree80d56f5041800814794c027df30a2abe44966700
parentb17adb033a1f6f4eb5b60bd9fbc781554d500514
drm/amd/pm: initialize variable

Static analysis reports this problem

amdgpu_pm.c:478:16: warning: The right operand of '<' is a garbage value
  for (i = 0; i < data.nums; i++) {
                ^ ~~~~~~~~~

In some cases data is not set.  Initialize to 0 and flag not setting
data as an error with the existing check.

Signed-off-by: Tom Rix <trix@redhat.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/amdgpu_pm.c