Skip to content

Commit

Permalink
net/hns3: fix device start return value
Browse files Browse the repository at this point in the history
[ upstream commit a9e2ac08156cbbe5cd3c72300618b871dedffd15 ]

If hns3_init_queues() return failed, the hns3vf_do_start() should
return errcode. This patch fixes it.

Fixes: 43d8adf ("net/hns3: fix RSS flow rule restore")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
  • Loading branch information
fengchengwen authored and kevintraynor committed Jul 11, 2023
1 parent 51a43c9 commit f630f70
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/net/hns3/hns3_ethdev_vf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1721,8 +1721,10 @@ hns3vf_do_start(struct hns3_adapter *hns, bool reset_queue)
hns3_enable_rxd_adv_layout(hw);

ret = hns3_init_queues(hns, reset_queue);
if (ret)
if (ret) {
hns3_err(hw, "failed to init queues, ret = %d.", ret);
return ret;
}

return hns3_restore_filter(hns);
}
Expand Down

0 comments on commit f630f70

Please sign in to comment.