Skip to content

Commit

Permalink
ice: Fix error return code in ice_add_prof()
Browse files Browse the repository at this point in the history
Fix to return a error code from the error handling case
instead of 0, as done elsewhere in this function.

Fixes: 31ad4e4 ("ice: Allocate flow profile")
Signed-off-by: Wei Yongjun <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Wei Yongjun authored and davem330 committed May 1, 2020
1 parent 654cad8 commit f8d530a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/net/ethernet/intel/ice/ice_flex_pipe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f8d530a

Please sign in to comment.