Skip to contentSkip to conversation

drm/amdgpu/irq: check if nbio funcs exist

PATCH In review Alex Deucher 2 participants 2 messages Sep 1, 2019 – Sep 2, 2019 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu/irq: check if nbio funcs exist

We need to check if the nbios funcs exist before
checking the individual pointers.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c +4 -2
index 3e49aa1465e2..0782f9153b60 100644
@@ -156,10 +156,12 @@ irqreturn_t amdgpu_irq_handler(int irq, void *arg)
 	 * register to check whether the interrupt is triggered or not, and properly
 	 * ack the interrupt if it is there
 	 */
-	if (adev->nbio.funcs->handle_ras_controller_intr_no_bifring)
+	if (adev->nbio.funcs &&
+	    adev->nbio.funcs->handle_ras_controller_intr_no_bifring)
 		adev->nbio.funcs->handle_ras_controller_intr_no_bifring(adev);
 
-	if (adev->nbio.funcs->handle_ras_err_event_athub_intr_no_bifring)
+	if (adev->nbio.funcs &&
+	    adev->nbio.funcs->handle_ras_err_event_athub_intr_no_bifring)
 		adev->nbio.funcs->handle_ras_err_event_athub_intr_no_bifring(adev);
 
 	return ret;
Signature · 6 lines
2.20.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 20190901173854.8824-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org

Reviewed-by Hawking Zhang
#2 lore raw

Sent from my iPhone

Quoted 36 lines · Alex Deucher

We need to check if the nbios funcs exist before
checking the individual pointers.

---
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 6 ++++--

1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c +4 -2
index 3e49aa1465e2..0782f9153b60 100644
@@ -156,10 +156,12 @@ irqreturn_t amdgpu_irq_handler(int irq, void *arg)
    * register to check whether the interrupt is triggered or not, and properly
    * ack the interrupt if it is there
    */
-    if (adev->nbio.funcs->handle_ras_controller_intr_no_bifring)
+    if (adev->nbio.funcs &&
+        adev->nbio.funcs->handle_ras_controller_intr_no_bifring)
       adev->nbio.funcs->handle_ras_controller_intr_no_bifring(adev);
 
-    if (adev->nbio.funcs->handle_ras_err_event_athub_intr_no_bifring)
+    if (adev->nbio.funcs &&
+        adev->nbio.funcs->handle_ras_err_event_athub_intr_no_bifring)
       adev->nbio.funcs->handle_ras_err_event_athub_intr_no_bifring(adev);
 
   return ret;
Signature · 6 lines
2.20.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx