gpu: nvgpu: fix misra 4.7 errors in gr unit

Fix remaining misra 4.7 violations in gr unit
misra_c_2012_directive_4_7_violation: returns error information
is not being checked.

Jira NVGPU-4054

Change-Id: Ia3051e6d55cad73523f2bf7f366c7eb58430c893
Signed-off-by: Vinod G <vinodg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2201759
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Vinod G
2019-09-19 11:24:17 -07:00
committed by Alex Waterman
parent 556055b25e
commit 4f47e36848
2 changed files with 13 additions and 4 deletions

View File

@@ -363,12 +363,19 @@ static int gr_init_config(struct gk20a *g, struct nvgpu_gr *gr)
static int nvgpu_gr_init_ctx_state(struct gk20a *g)
{
int err = 0;
if (g->gr->golden_image != NULL &&
nvgpu_gr_obj_ctx_is_golden_image_ready(g->gr->golden_image)) {
return 0;
nvgpu_gr_obj_ctx_is_golden_image_ready(g->gr->golden_image)) {
return err;
}
return nvgpu_gr_falcon_init_ctx_state(g, g->gr->falcon);
err = nvgpu_gr_falcon_init_ctx_state(g, g->gr->falcon);
if (err != 0) {
nvgpu_err(g, "gr ctx_state init failed");
}
return err;
}
static int gr_init_ctx_and_map_zbc(struct gk20a *g)

View File

@@ -247,7 +247,9 @@ static int gr_gv100_scg_estimate_perf(struct gk20a *g,
err = gr_gv100_scg_calculate_perf(gr_config, scale_factor,
scg_num_pes, num_tpc_gpc, max_tpc_gpc,
min_scg_gpc_pix_perf, average_tpcs, perf);
if (err != 0) {
nvgpu_err(g, "scg perf calculation failed");
}
free_resources:
nvgpu_kfree(g, num_tpc_gpc);
return err;