From f0776d26f2d89cc8c5c1dfe734d9570b41e39785 Mon Sep 17 00:00:00 2001 From: vinodg Date: Tue, 28 Jan 2020 16:56:41 -0800 Subject: [PATCH] gpu: nvgpu: remove unwanted error code checking in common.netlist Remove unwanted error checking in common.netlist to make branch coverage better. Jira NVGPU-4920 Change-Id: I73535102af6eb83d1ffb1d166b9fdbeaa6302b35 Signed-off-by: vinodg Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2286761 Reviewed-by: svc-mobile-coverity Reviewed-by: svc-mobile-misra Reviewed-by: svc-mobile-cert Reviewed-by: Deepak Nibade Reviewed-by: Alex Waterman Reviewed-by: Seshendra Gadagottu Reviewed-by: mobile promotions Tested-by: mobile promotions GVS: Gerrit_Virtual_Submit --- drivers/gpu/nvgpu/common/netlist/netlist.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/nvgpu/common/netlist/netlist.c b/drivers/gpu/nvgpu/common/netlist/netlist.c index 38aff08b9..bef5c74eb 100644 --- a/drivers/gpu/nvgpu/common/netlist/netlist.c +++ b/drivers/gpu/nvgpu/common/netlist/netlist.c @@ -222,9 +222,8 @@ static bool nvgpu_netlist_handle_sw_bundles_region_id(struct gk20a *g, static bool nvgpu_netlist_handle_generic_region_id(struct gk20a *g, u32 region_id, u8 *src, u32 size, u32 *major_v, u32 *netlist_num, - struct nvgpu_netlist_vars *netlist_vars, int *err_code) + struct nvgpu_netlist_vars *netlist_vars) { - int err = 0; bool handled = true; switch (region_id) { @@ -252,8 +251,6 @@ static bool nvgpu_netlist_handle_generic_region_id(struct gk20a *g, break; } - *err_code = err; - return handled; } @@ -429,8 +426,8 @@ static int nvgpu_netlist_handle_region_id(struct gk20a *g, } handled = nvgpu_netlist_handle_generic_region_id(g, region_id, src, size, major_v, netlist_num, - netlist_vars, &err); - if ((err != 0) || handled) { + netlist_vars); + if (handled) { goto clean_up; } #ifdef CONFIG_NVGPU_DEBUGGER