]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: hns3: remove an unnecessary check in hclge_set_umv_space()
authorHuazhong Tan <tanhuazhong@huawei.com>
Sun, 26 Apr 2020 02:13:48 +0000 (10:13 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 26 Apr 2020 03:56:45 +0000 (20:56 -0700)
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>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c

index c74990a59e10c878c9783281eb2485e571d76b95..e2fec832fdf02761bf5e22bf456494fe35f1fe98 100644 (file)
@@ -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;
 }