From 435892a784b51ebe9bb8a0844ae4f83607726c8e Mon Sep 17 00:00:00 2001 From: Debarshi Dutta Date: Tue, 9 Oct 2018 16:06:50 +0530 Subject: [PATCH] gpu: nvgpu: initialize boolean to prevent UBScan bugs UBSan flags the error "load of value 255 is not a valid value for type '_Bool'". This is caused due to unitialized boolean value as given in the UBSan specification i.e. the following check -fsanitize=bool: Load of a bool value which is neither true nor false. Bug 200452078 Change-Id: I262320fd72960b41951f6b9c99f64400457d9790 Signed-off-by: Debarshi Dutta Reviewed-on: https://git-master.nvidia.com/r/1923241 Reviewed-by: svc-mobile-coverity GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman Reviewed-by: Ashish Mhetre Reviewed-by: Sachin Nikam Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/os/linux/ioctl_dbg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/nvgpu/os/linux/ioctl_dbg.c b/drivers/gpu/nvgpu/os/linux/ioctl_dbg.c index 85247261c..2542c776b 100644 --- a/drivers/gpu/nvgpu/os/linux/ioctl_dbg.c +++ b/drivers/gpu/nvgpu/os/linux/ioctl_dbg.c @@ -793,7 +793,7 @@ static int nvgpu_ioctl_channel_reg_ops(struct dbg_session_gk20a *dbg_s, struct gk20a *g = dbg_s->g; struct channel_gk20a *ch; - bool is_current_ctx; + bool is_current_ctx = false; nvgpu_log_fn(g, "%d ops, max fragment %d", args->num_ops, g->dbg_regops_tmp_buf_ops);