From 40d9609effc7c14c119c54a27af3e62be2a383d9 Mon Sep 17 00:00:00 2001 From: Philip Elcan Date: Thu, 16 May 2019 11:23:19 -0400 Subject: [PATCH] gpu: nvgpu: mm: fix 4.7 violation in page_table MISRA 4.7 requires checking errors returned by functions. This fixes a case where the error information wasn't being checked before performing other operations. JIRA NVGPU-3340 Signed-off-by: Philip Elcan Change-Id: I480fde75a07f779450096533ab29c76975aff092 Reviewed-on: https://git-master.nvidia.com/r/2120489 Reviewed-by: svc-mobile-coverity Reviewed-by: svc-mobile-misra GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/mm/gmmu/page_table.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/nvgpu/common/mm/gmmu/page_table.c b/drivers/gpu/nvgpu/common/mm/gmmu/page_table.c index aefcaa0dd..b506bc280 100644 --- a/drivers/gpu/nvgpu/common/mm/gmmu/page_table.c +++ b/drivers/gpu/nvgpu/common/mm/gmmu/page_table.c @@ -741,6 +741,9 @@ static int nvgpu_gmmu_update_page_table(struct vm_gk20a *vm, virt_addr, length, attrs); + if (err != 0) { + nvgpu_err(g, "nvgpu_gmmu_do_update_page_table returned error"); + } nvgpu_mb();