From: Bjorn Helgaas Date: Wed, 26 Dec 2012 17:39:22 +0000 (-0700) Subject: PCI: Remove spurious error for sriov_numvfs store and simplify flow X-Git-Tag: v3.8-rc2~3^2~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=faa48a507fd328013886426f9437fd7e2e7b820b;p=pandora-kernel.git PCI: Remove spurious error for sriov_numvfs store and simplify flow If we request "num_vfs" and the driver's sriov_configure() method enables exactly that number ("num_vfs_enabled"), we complain "Invalid value for number of VFs to enable" and return an error. We should silently return success instead. Also, use kstrtou16() since numVFs is defined to be a 16-bit field and rework to simplify control flow. Reported-by: Greg Rose Reference: http://lkml.kernel.org/r/20121214101911.00002f59@unknown Signed-off-by: Bjorn Helgaas Tested-by: Donald Dutile --- Reading git-diff-tree failed