Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 743e1a84 authored by Salil Mehta's avatar Salil Mehta Committed by David S. Miller
Browse files

net: hns3: Fixes error reported by Kbuild and internal review



This patch fixes the error reported by Intel's kbuild and fixes a
return value in one of the legs, caught during review of the original
patch sent by kbuild.

Fixes: fdb793670a00 ("net: hns3: Add support of .sriov_configure in HNS3 driver")
Signed-off-by: default avatarFengguang Wu <fengguang.wu@intel.com>
Signed-off-by: default avatarSalil Mehta <salil.mehta@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 52f8560e
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1579,7 +1579,7 @@ static void hns3_remove(struct pci_dev *pdev)
 * Enable or change the number of VFs. Called when the user updates the number
 * of VFs in sysfs.
 **/
int hns3_pci_sriov_configure(struct pci_dev *pdev, int num_vfs)
static int hns3_pci_sriov_configure(struct pci_dev *pdev, int num_vfs)
{
	int ret;

@@ -1592,6 +1592,8 @@ int hns3_pci_sriov_configure(struct pci_dev *pdev, int num_vfs)
		ret = pci_enable_sriov(pdev, num_vfs);
		if (ret)
			dev_err(&pdev->dev, "SRIOV enable failed %d\n", ret);
		else
			return num_vfs;
	} else if (!pci_vfs_assigned(pdev)) {
		pci_disable_sriov(pdev);
	} else {