From: Peng Li Date: Thu, 20 Dec 2018 03:52:06 +0000 (+0800) Subject: net: hns3: remove redundant variable initialization X-Git-Tag: v5.0-rc1~129^2~33^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1154bb26c879fea51c20aee167ddce4345caa255;p=thirdparty%2Fkernel%2Flinux.git net: hns3: remove redundant variable initialization This patch removes the redundant variable initialization, as driver will devm_kzalloc to set value to hdev soon. Signed-off-by: Peng Li Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c index 156242f96a8e1..82103d5fa8159 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c @@ -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)