Commit f8d530ac authored by Wei Yongjun's avatar Wei Yongjun Committed by David S. Miller

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.

Fixes: 31ad4e4e ("ice: Allocate flow profile")
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 654cad8b
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment