[PATCH] drm/amdgpu: Avoid null pointer dereference in soc15_reg_base_init()

Markus Elfring Markus.Elfring at web.de
Thu Oct 1 13:30:28 UTC 2020


> that change, the NULL pointer dereference does not occur:

* Please provide a proper tag “Signed-off-by”.

* How do you think about to add the tag “Fixes” to the commit message?

* Would another imperative wording become helpful for the change description?

* Would you like to choose an other patch subject?


…
> +++ b/drivers/gpu/drm/amd/amdgpu/soc15.c
> @@ -699,7 +699,8 @@  static void soc15_reg_base_init(struct amdgpu_device *adev)
>                                          "fallback to legacy init method\n");
>                                 vega10_reg_base_init(adev);
>                         }
> -               }
> +               } else
> +                       vega10_reg_base_init(adev);
>                 break;
…

Will curly brackets be relevant also for this else branch?

Regards,
Markus


More information about the amd-gfx mailing list