summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/ice/ice_common.c
diff options
context:
space:
mode:
authorTony Nguyen <anthony.l.nguyen@intel.com>2021-10-08 02:00:23 +0300
committerTony Nguyen <anthony.l.nguyen@intel.com>2021-12-14 21:19:13 +0300
commit2ccc1c1ccc671b8bb33ad7845dcf6c75d3c892ae (patch)
treec79892d8996543cbe3d1dd74ec1aa5f748de01f4 /drivers/net/ethernet/intel/ice/ice_common.c
parent5518ac2a64423f226e922b6719cf0eb62c31e141 (diff)
downloadlinux-2ccc1c1ccc671b8bb33ad7845dcf6c75d3c892ae.tar.xz
ice: Remove excess error variables
ice_status previously had a variable to contain these values where other error codes had a variable as well. With ice_status now being an int, there is no need for two variables to hold error values. In cases where this occurs, remove one of the excess variables and use a single one. Some initialization of variables are no longer needed and have been removed. Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> Tested-by: Gurucharan G <gurucharanx.g@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_common.c')
-rw-r--r--drivers/net/ethernet/intel/ice/ice_common.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_common.c b/drivers/net/ethernet/intel/ice/ice_common.c
index 2728cea1a490..cc8297e1db3a 100644
--- a/drivers/net/ethernet/intel/ice/ice_common.c
+++ b/drivers/net/ethernet/intel/ice/ice_common.c
@@ -4447,7 +4447,6 @@ ice_ena_vsi_rdma_qset(struct ice_port_info *pi, u16 vsi_handle, u8 tc,
struct ice_sched_node *parent;
struct ice_hw *hw;
u16 i, buf_size;
- int status;
int ret;
if (!pi || pi->port_state != ICE_SCHED_PORT_STATE_READY)
@@ -4496,12 +4495,10 @@ ice_ena_vsi_rdma_qset(struct ice_port_info *pi, u16 vsi_handle, u8 tc,
node.data.elem_type = ICE_AQC_ELEM_TYPE_LEAF;
for (i = 0; i < num_qsets; i++) {
node.node_teid = buf->rdma_qsets[i].qset_teid;
- status = ice_sched_add_node(pi, hw->num_tx_sched_layers - 1,
- &node);
- if (status) {
- ret = status;
+ ret = ice_sched_add_node(pi, hw->num_tx_sched_layers - 1,
+ &node);
+ if (ret)
break;
- }
qset_teid[i] = le32_to_cpu(node.node_teid);
}
rdma_error_exit: