Skip to content

Commit

Permalink
net: hns3: remove an unnecessary check in hclge_set_umv_space()
Browse files Browse the repository at this point in the history
Since hclge_set_umv_space() is only called by hclge_init_umv_space(),
parameter 'allocated_size' will not be NULL.

Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Huazhong Tan authored and David S. Miller committed Apr 26, 2020
1 parent 659d458 commit 3fd8dc2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -7227,8 +7227,7 @@ static int hclge_set_umv_space(struct hclge_dev *hdev, u16 space_size,
return ret;
}

if (allocated_size)
*allocated_size = le32_to_cpu(desc.data[1]);
*allocated_size = le32_to_cpu(desc.data[1]);

return 0;
}
Expand Down

0 comments on commit 3fd8dc2

Please sign in to comment.