Skip to contentSkip to conversation

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

PATCH Markus Elfring 1 participant 1 message Oct 1, 2020

lore
Share & tools
lore
#0 lore raw
Quoted 1 line

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?

…

Review static void soc15_reg_base_init(struct amdgpu_device *adev) · line 704

Quoted 9 lines

+++ b/drivers/gpu/drm/amd/amdgpu/soc15.c

(quoted diff) +2 -1
@@ -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
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx