From 11819380e8e8f9b73938535552bedb232153611b Mon Sep 17 00:00:00 2001 From: Sagar Kamble Date: Tue, 5 Apr 2022 15:50:27 +0530 Subject: [PATCH] gpu: nvgpu: remove invalid NULL check mmufault will not be NULL when recovery is triggered of type RC_TYPE_MMU_FAULT. NULL check for it at one place followed by dereference is flagged as CERT issue. Remove this invalid NULL check. CID 17871 Bug 3512546 Change-Id: Ice8035f5df33c45ef0afb4c2a1395e0d5455652c Signed-off-by: Sagar Kamble Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2692544 Reviewed-by: svc-mobile-coverity Reviewed-by: svc-mobile-cert Reviewed-by: svcacv Reviewed-by: svc-mobile-misra Reviewed-by: Alex Waterman Reviewed-by: Vijayakumar Subbu GVS: Gerrit_Virtual_Submit --- drivers/gpu/nvgpu/hal/rc/rc_gv11b.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/nvgpu/hal/rc/rc_gv11b.c b/drivers/gpu/nvgpu/hal/rc/rc_gv11b.c index d420a7212..93648384b 100644 --- a/drivers/gpu/nvgpu/hal/rc/rc_gv11b.c +++ b/drivers/gpu/nvgpu/hal/rc/rc_gv11b.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2015-2022, NVIDIA CORPORATION. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -227,7 +227,7 @@ void gv11b_fifo_recover(struct gk20a *g, u32 act_eng_bitmask, nvgpu_tsg_set_unserviceable(g, tsg); } - if (rc_type == RC_TYPE_MMU_FAULT && mmufault != NULL) { + if (rc_type == RC_TYPE_MMU_FAULT) { if (mmufault->faulted_pbdma != INVAL_ID) { pbdma_bitmask = BIT32(mmufault->faulted_pbdma); }