[v2,12/21] net/ice/base: return error directly
diff mbox series

Message ID 20201025002953.1680999-13-qi.z.zhang@intel.com
State Superseded, archived
Delegated to: Qi Zhang
Headers show
Series
  • ice: update base code
Related show

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Zhang, Qi Z Oct. 25, 2020, 12:29 a.m. UTC
As there is nothing to unroll, return the error directly. Remove the label
as this is the only reference to that label.

Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/base/ice_sched.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

Patch
diff mbox series

diff --git a/drivers/net/ice/base/ice_sched.c b/drivers/net/ice/base/ice_sched.c
index 16314ef18e..7867d4fda8 100644
--- a/drivers/net/ice/base/ice_sched.c
+++ b/drivers/net/ice/base/ice_sched.c
@@ -2662,10 +2662,9 @@  ice_sched_cfg_agg(struct ice_port_info *pi, u32 agg_id,
 		/* Create new entry for new aggregator ID */
 		agg_info = (struct ice_sched_agg_info *)
 			ice_malloc(hw, sizeof(*agg_info));
-		if (!agg_info) {
-			status = ICE_ERR_NO_MEMORY;
-			goto exit_reg_agg;
-		}
+		if (!agg_info)
+			return ICE_ERR_NO_MEMORY;
+
 		agg_info->agg_id = agg_id;
 		agg_info->agg_type = agg_type;
 		agg_info->tc_bitmap[0] = 0;
@@ -2698,7 +2697,7 @@  ice_sched_cfg_agg(struct ice_port_info *pi, u32 agg_id,
 		/* Save aggregator node's TC information */
 		ice_set_bit(tc, agg_info->tc_bitmap);
 	}
-exit_reg_agg:
+
 	return status;
 }