gpu: nvgpu: fix MISRA 17.7 rule in gr falcon

Added return value error check for following function calls:
nvgpu_gr_falcon_copy_ctxsw_ucode_segments

JIRA NVGPU-3226

Change-Id: I52b930cc33414a93407b6ab60189148e93d8fcea
Signed-off-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2107662
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Seshendra Gadagottu
2019-04-26 13:04:16 -07:00
committed by mobile promotions
parent e5f95a9ca2
commit 62c3b658ef

View File

@@ -326,20 +326,28 @@ int nvgpu_gr_falcon_init_ctxsw_ucode(struct gk20a *g,
goto clean_up;
}
nvgpu_gr_falcon_copy_ctxsw_ucode_segments(g, &ucode_info->surface_desc,
err = nvgpu_gr_falcon_copy_ctxsw_ucode_segments(g,
&ucode_info->surface_desc,
&ucode_info->fecs,
fecs_boot_image,
nvgpu_netlist_get_fecs_inst_list(g),
nvgpu_netlist_get_fecs_data_list(g));
if (err != 0) {
goto clean_up;
}
nvgpu_release_firmware(g, fecs_fw);
fecs_fw = NULL;
nvgpu_gr_falcon_copy_ctxsw_ucode_segments(g, &ucode_info->surface_desc,
err = nvgpu_gr_falcon_copy_ctxsw_ucode_segments(g,
&ucode_info->surface_desc,
&ucode_info->gpccs,
gpccs_boot_image,
nvgpu_netlist_get_gpccs_inst_list(g),
nvgpu_netlist_get_gpccs_data_list(g));
if (err != 0) {
goto clean_up;
}
nvgpu_release_firmware(g, gpccs_fw);
gpccs_fw = NULL;