diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pci/pci-sysfs.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index 941e939d1da9..89a08ed39c94 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c | |||
@@ -960,7 +960,12 @@ static ssize_t reset_store(struct device *dev, | |||
960 | 960 | ||
961 | if (val != 1) | 961 | if (val != 1) |
962 | return -EINVAL; | 962 | return -EINVAL; |
963 | return pci_reset_function(pdev); | 963 | |
964 | result = pci_reset_function(pdev); | ||
965 | if (result < 0) | ||
966 | return result; | ||
967 | |||
968 | return count; | ||
964 | } | 969 | } |
965 | 970 | ||
966 | static struct device_attribute reset_attr = __ATTR(reset, 0200, NULL, reset_store); | 971 | static struct device_attribute reset_attr = __ATTR(reset, 0200, NULL, reset_store); |