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 <ddutta@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1923241
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Debarshi Dutta
2018-10-09 16:06:50 +05:30
committed by Abdul Salam
parent 0f68b79add
commit 435892a784

View File

@@ -793,7 +793,7 @@ static int nvgpu_ioctl_channel_reg_ops(struct dbg_session_gk20a *dbg_s,
struct gk20a *g = dbg_s->g; struct gk20a *g = dbg_s->g;
struct channel_gk20a *ch; 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); nvgpu_log_fn(g, "%d ops, max fragment %d", args->num_ops, g->dbg_regops_tmp_buf_ops);