fpga: dfl: pci: fix return value of cci_pci_sriov_configure
authorXu Yilun <yilun.xu@intel.com>
Tue, 25 Feb 2020 06:07:18 +0000 (14:07 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Apr 2020 14:33:22 +0000 (16:33 +0200)
commita0f1f53ecd8d161d2e3d71a169b0971a1cbcefc4
treefccd041e27f8adafec1ce8e299f67c8e53778e13
parent22432bcf066c1017a08a4c05883f4008b04ba03d
fpga: dfl: pci: fix return value of cci_pci_sriov_configure

commit 3c2760b78f90db874401d97e3c17829e2e36f400 upstream.

pci_driver.sriov_configure should return negative value on error and
number of enabled VFs on success. But now the driver returns 0 on
success. The sriov configure still works but will cause a warning
message:

  XX VFs requested; only 0 enabled

This patch changes the return value accordingly.

Cc: stable@vger.kernel.org
Signed-off-by: Xu Yilun <yilun.xu@intel.com>
Signed-off-by: Wu Hao <hao.wu@intel.com>
Signed-off-by: Moritz Fischer <mdf@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/fpga/dfl-pci.c