ice: Fix error return code in ice_add_prof()
Subsystems (4)
PATCH 1/1 ice: Fix error return code in ice_add_prof()
Fix to return a error code from the error handling case instead of 0, as done elsewhere in this function.
--- drivers/net/ethernet/intel/ice/ice_flex_pipe.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/ethernet/intel/ice/ice_flex_pipe.c +3 -1
@@ -2962,8 +2962,10 @@ ice_add_prof(struct ice_hw *hw, enum ice_block blk, u64 id, u8 ptypes[],/* add profile info */ prof =devm_kzalloc (ice_hw_to_dev (hw),sizeof (*prof),GFP_KERNEL ); -if (!prof) +if (!prof) { + status =ICE_ERR_NO_MEMORY ; goto err_ice_add_prof; + } prof->profile_cookie = id; prof->prof_id = prof_id;
From: Wei Yongjun <[email protected]>
Date: Mon, 27 Apr 2020 12:12:28 +0000
Quoted 5 lines
Fix to return a error code from the error handling case instead of 0, as done elsewhere in this function.
Fixes 31ad4e4ee1e4 ("ice: Allocate flow profile")Signed-off-by Wei Yongjun <[email protected]>
Applied, thanks.
Quoted 11 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Wei Yongjun
Sent: Monday, April 27, 2020 5:12 AM
To: Kirsher, Jeffrey T <[email protected]>; Nguyen, Anthony L <[email protected]>
Cc: intel-wired-lan at lists.osuosl.org; kernel-janitors at vger.kernel.org; Wei Yongjun <[email protected]>; netdev at vger.kernel.org
Subject: [Intel-wired-lan] [PATCH net-next] ice: Fix error return code inice_add_prof()
Quoted 8 lines
Fix to return a error code from the error handling case instead of 0, as done elsewhere in this function.
Fixes 31ad4e4ee1e4 ("ice: Allocate flow profile")Signed-off-by Wei Yongjun <[email protected]>--- drivers/net/ethernet/intel/ice/ice_flex_pipe.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)