net: hns3: minior error handling change for hclge_tm_schd_info_init
authorYunsheng Lin <linyunsheng@huawei.com>
Thu, 1 Aug 2019 03:55:40 +0000 (11:55 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 1 Aug 2019 17:32:13 +0000 (13:32 -0400)
commitb6872fd361056f3bce3e9fcfe9535c4b6b737531
treeb28dd2a61c919db686a8d88fcd61835c4c02200f
parenta4ee7624c003cc73a2eac9d9d5317b0c9fed89c4
net: hns3: minior error handling change for hclge_tm_schd_info_init

When hclge_tm_schd_info_update calls hclge_tm_schd_info_init to
initialize the schedule info, hdev->tm_info.num_pg and
hdev->tx_sch_mode is not changed, which makes the checking in
hclge_tm_schd_info_init unnecessary.

So this patch moves the hdev->tm_info.num_pg and hdev->tx_sch_mode
checking into hclge_tm_schd_init and changes the return type of
hclge_tm_schd_info_init from int to void.

Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Reviewed-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c