summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2019-09-01 12:31:42 -0500
committerAlex Deucher <alexander.deucher@amd.com>2019-09-16 09:54:14 -0500
commitbb42eda28407f62288398b4ef846ae64c98cdc73 (patch)
tree6325b14396a7a788e5193d803ce17d9cca54fca8
parentdabeea6427dfb03ecc8bbefc4f76e976ab7a8148 (diff)
drm/amdgpu/irq: check if nbio funcs exist
We need to check if the nbios funcs exist before checking the individual pointers. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
index 4ed6a4d0d7db..1f2628f445c4 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
@@ -159,10 +159,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;