Coverity: gfx_v9_0_init_cp_compute_microcode(): Control flow issues

coverity-bot keescook at chromium.org
Thu Jan 12 22:24:34 UTC 2023


Hello!

This is an experimental semi-automated report about issues detected by
Coverity from a scan of next-20230111 as part of the linux-next scan project:
https://scan.coverity.com/projects/linux-next-weekly-scan

You're getting this email because you were associated with the identified
lines of code (noted below) that were touched by commits:

  Mon Jan 9 17:02:18 2023 -0500
    ec787deb2ddf ("drm/amd: Use `amdgpu_ucode_*` helpers for GFX9")

Coverity reported the following:

*** CID 1530548:  Control flow issues  (DEADCODE)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c:1374 in gfx_v9_0_init_cp_compute_microcode()
1368     		adev->gfx.mec2_feature_version = adev->gfx.mec_feature_version;
1369     	}
1370
1371     	gfx_v9_0_check_if_need_gfxoff(adev);
1372     	gfx_v9_0_check_fw_write_wait(adev);
1373     	if (err) {
vvv     CID 1530548:  Control flow issues  (DEADCODE)
vvv     Execution cannot reach this statement: "amdgpu_ucode_release(&adev-...".
1374     		amdgpu_ucode_release(&adev->gfx.mec_fw);
1375     		amdgpu_ucode_release(&adev->gfx.mec2_fw);
1376     	}
1377     	return err;
1378     }
1379

If this is a false positive, please let us know so we can mark it as
such, or teach the Coverity rules to be smarter. If not, please make
sure fixes get into linux-next. :) For patches fixing this, please
include these lines (but double-check the "Fixes" first):

Reported-by: coverity-bot <keescook+coverity-bot at chromium.org>
Addresses-Coverity-ID: 1530548 ("Control flow issues")
Fixes: ec787deb2ddf ("drm/amd: Use `amdgpu_ucode_*` helpers for GFX9")

Thanks for your attention!

-- 
Coverity-bot


More information about the dri-devel mailing list