X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=blobdiff_plain;f=drivers%2Fpci%2Fpci-sysfs.c;h=c9957f68ac9bd574964271b363012aa62c8c8bc3;hp=6309c5a2528f1912bddabaabc6b870ed271a54e7;hb=3be434f0244ee059432f92de7e891ee514f41738;hpb=7f02ab3ce3c7e093c414fcbd93bdc591cc4419d0 diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index 6309c5a2528f..c9957f68ac9b 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c @@ -979,7 +979,12 @@ static ssize_t reset_store(struct device *dev, if (val != 1) return -EINVAL; - return pci_reset_function(pdev); + + result = pci_reset_function(pdev); + if (result < 0) + return result; + + return count; } static struct device_attribute reset_attr = __ATTR(reset, 0200, NULL, reset_store);