PCI: return correct value when writing to the "reset" attribute
authorMichal Schmidt <mschmidt@redhat.com>
Tue, 11 May 2010 09:44:54 +0000 (11:44 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sun, 27 Mar 2011 18:30:32 +0000 (11:30 -0700)
commite2ecd6d878d85b5960471e35769e3512054b0302
treef31d4639b05c49478bc89d2bd234480e03d9cd82
parent75a982025995faf9f6875e8e6efb053b839e0c47
PCI: return correct value when writing to the "reset" attribute

commit 447c5dd7338638f526e9bcf7dcf69b4da5835c7d upstream.

A successful write() to the "reset" sysfs attribute should return the
number of bytes written, not 0. Otherwise userspace (bash) retries the
write over and over again.

Acked-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/pci/pci-sysfs.c