aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikko Perttunen <[email protected]>2023-09-01 14:59:10 +0300
committerThierry Reding <[email protected]>2023-10-11 22:52:44 +0200
commit3868ff006b572cf501a3327832d36c64a9eca86a (patch)
tree001ae4ab0ed2d848b6c6866809d524930d549b7e
parente889a311f74f4ae8bd40755a2c58d02e1c684fef (diff)
drm/tegra: Zero-initialize iosys_map
UBSAN reports an invalid load for bool, as the iosys_map is read later without being initialized. Zero-initialize it to avoid this. Reported-by: Ashish Mhetre <[email protected]> Signed-off-by: Mikko Perttunen <[email protected]> Signed-off-by: Thierry Reding <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
-rw-r--r--drivers/gpu/drm/tegra/gem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/tegra/gem.c b/drivers/gpu/drm/tegra/gem.c
index 11296de59c5a..363e02f86382 100644
--- a/drivers/gpu/drm/tegra/gem.c
+++ b/drivers/gpu/drm/tegra/gem.c
@@ -177,7 +177,7 @@ static void tegra_bo_unpin(struct host1x_bo_mapping *map)
static void *tegra_bo_mmap(struct host1x_bo *bo)
{
struct tegra_bo *obj = host1x_to_tegra_bo(bo);
- struct iosys_map map;
+ struct iosys_map map = { 0 };
int ret;
if (obj->vaddr)