[PATCH 6/6] drm/amd/amdgpu: sdma_v4_0_start: initialize r
Alex Deucher
alexdeucher at gmail.com
Mon Jun 24 17:44:04 UTC 2019
Applied the series. Thanks!
Alex
On Mon, Jun 24, 2019 at 11:16 AM Ernst Sjöstrand <ernstp at gmail.com> wrote:
>
> Reported by smatch:
> drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c:1167 sdma_v4_0_start() error: uninitialized symbol 'r'.
>
> Signed-off-by: Ernst Sjöstrand <ernstp at gmail.com>
> ---
> drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
> index c0b6011b4bd1..9e571ca283c3 100644
> --- a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
> @@ -1092,7 +1092,7 @@ static int sdma_v4_0_load_microcode(struct amdgpu_device *adev)
> static int sdma_v4_0_start(struct amdgpu_device *adev)
> {
> struct amdgpu_ring *ring;
> - int i, r;
> + int i, r = 0;
>
> if (amdgpu_sriov_vf(adev)) {
> sdma_v4_0_ctx_switch_enable(adev, false);
> --
> 2.20.1
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
More information about the amd-gfx
mailing list