mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
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:
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user