drm/fusa-capture: Zero out dma_buf_map struct

UBSAN is reporting "invalid-load include/linux/dma-buf-map.h".
This is because non-boolean value loaded to bool variable is_iomem
of dma_buf_map struct. Zeroing out this struct at declaration time
make sure that there is no garbage value which will be non-boolean.

Bug 3994163

Change-Id: Ia3f0c738fa248d3096d945f08813b7bdbad233f7
Signed-off-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2869258
Tested-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Ashish Mhetre
2023-03-10 17:20:28 +00:00
committed by Laxman Dewangan
parent 572d5395cc
commit 3fdc3313ae

View File

@@ -179,9 +179,9 @@ static void *tegra_bo_mmap(struct host1x_bo *bo)
{
struct tegra_bo *obj = host1x_to_tegra_bo(bo);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0)
struct iosys_map map;
struct iosys_map map = {0};
#else
struct dma_buf_map map;
struct dma_buf_map map = {0};
#endif
int ret;