Skip to content

Commit

Permalink
net/hns3: fix uninitialized variable
Browse files Browse the repository at this point in the history
[ upstream commit 156496da7a527e36066596a7be7758037b2541b4 ]

This patch fixes possible use of uninitialized variable
"old_tuple_fields".

Fixes: e3069658da9f ("net/hns3: reimplement hash flow function")

Signed-off-by: Jie Hai <haijie1@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
  • Loading branch information
Jie Hai authored and kevintraynor committed Jul 11, 2023
1 parent f630f70 commit 1834797
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/net/hns3/hns3_flow.c
Original file line number Diff line number Diff line change
Expand Up @@ -1897,8 +1897,9 @@ hns3_flow_set_rss_ptype_tuple(struct hns3_hw *hw,
if (ret != 0)
return ret;

hns3_info(hw, "RSS tuple fields changed from 0x%" PRIx64 " to 0x%" PRIx64,
old_tuple_fields, new_tuple_fields);
if (!cfg_global_tuple)
hns3_info(hw, "RSS tuple fields changed from 0x%" PRIx64 " to 0x%" PRIx64,
old_tuple_fields, new_tuple_fields);

return 0;
}
Expand Down

0 comments on commit 1834797

Please sign in to comment.