net: hns3: remove redundant variable initialization
authorPeng Li <lipeng321@huawei.com>
Thu, 20 Dec 2018 03:52:06 +0000 (11:52 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 20 Dec 2018 07:47:59 +0000 (23:47 -0800)
This patch removes the redundant variable initialization,
as driver will devm_kzalloc to set value to hdev soon.

Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c

index 156242f96a8e1d45db4f3173ef2617ed290ad426..82103d5fa81592cae736257484921ef287d4825c 100644 (file)
@@ -1721,7 +1721,7 @@ static int hclgevf_configure(struct hclgevf_dev *hdev)
 static int hclgevf_alloc_hdev(struct hnae3_ae_dev *ae_dev)
 {
        struct pci_dev *pdev = ae_dev->pdev;
-       struct hclgevf_dev *hdev = ae_dev->priv;
+       struct hclgevf_dev *hdev;
 
        hdev = devm_kzalloc(&pdev->dev, sizeof(*hdev), GFP_KERNEL);
        if (!hdev)