[PATCH 2/2] drm/amdgpu/vi: add missing error handling when setting uvd dclk

Emil Velikov emil.l.velikov at gmail.com
Thu Mar 16 03:40:53 UTC 2017


Hi Alex,

On 16 March 2017 at 02:06, Alex Deucher <alexdeucher at gmail.com> wrote:
> Noticed-by: David Binderman <dcb314 at hotmail.com>
In case it matters - Reported-by or Suggested-by are the more common tags.
Quick search in kernel history [since 2007] shows less than ~60
instances of the above with ~20 from yourself.

> Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/vi.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c
> index 28385b8..eff123b 100644
> --- a/drivers/gpu/drm/amd/amdgpu/vi.c
> +++ b/drivers/gpu/drm/amd/amdgpu/vi.c
> @@ -795,6 +795,8 @@ static int vi_set_uvd_clocks(struct amdgpu_device *adev, u32 vclk, u32 dclk)
>                 return r;
>
>         r = vi_set_uvd_clock(adev, dclk, ixCG_DCLK_CNTL, ixCG_DCLK_STATUS);
> +       if (r)
> +               return r;
>
>         return 0;
One can drop the intermediate "r" here

   return vi_set_uvd_clock(adev, dclk, ixCG_DCLK_CNTL, ixCG_DCLK_STATUS);

Either way both patches are correct. so FWIW
Reviewed-by: Emil Velikov <emil.l.velikov at gmail.com>

-Emil


More information about the amd-gfx mailing list