[6/6] drm/amd/amdgpu: sdma_v4_0_start: initialize r

Submitted by Ernst Sjöstrand on June 24, 2019, 3:15 p.m.

Details

Message ID 20190624151544.13934-6-ernstp@gmail.com
State Accepted
Commit aeaa72e25ea8d2a2de6263ab0fe05307a588bdce
Headers show
Series "Series without cover letter" ( rev: 1 ) in AMD X.Org drivers

Not browsing as part of any series.

Commit Message

Ernst Sjöstrand June 24, 2019, 3:15 p.m.
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@gmail.com>
---
 drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

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);

Comments

Applied the series.  Thanks!

Alex

On Mon, Jun 24, 2019 at 11:16 AM Ernst Sjöstrand <ernstp@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@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@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx