The error log is supposed to be gaurded under if failure condition.
Fixes: faab5ea08367 ("drm/amdgpu: Check vcn sram load return value")
Signed-off-by: Sathishkumar S <sathishkumar.sundararaju@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
if (indirect) {
ret = amdgpu_vcn_psp_update_sram(adev, inst_idx, 0);
- dev_err(adev->dev, "%s: vcn sram load failed %d\n", __func__, ret);
- if (ret)
+ if (ret) {
+ dev_err(adev->dev, "%s: vcn sram load failed %d\n", __func__, ret);
return ret;
+ }
}
ring = &adev->vcn.inst[inst_idx].ring_enc[0];