gpu: nvgpu: fix misra 14.4 and 15.6 errors in vm.c

Rule 14.4 requires if statement condition to be Boolean type. Rule 15.6
requires body of if statement should be a compound statement.
This patch fixes above rules in vm.c.

Jira NVGPU-4780

Change-Id: Iea605ab551a1cf232b59f7dda502df89899a3480
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2278607
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Vedashree Vidwans
2020-01-13 15:45:58 -08:00
committed by Alex Waterman
parent d0f3529d10
commit 5b47cd73fb

View File

@@ -1040,7 +1040,9 @@ int nvgpu_vm_get_buffers(struct vm_gk20a *vm,
nvgpu_rbtree_enum_next(&node, node);
}
BUG_ON(i != vm->num_user_mapped_buffers);
if (i != vm->num_user_mapped_buffers) {
BUG();
}
*num_buffers = vm->num_user_mapped_buffers;
*mapped_buffers = buffer_list;