]> git.baikalelectronics.ru Git - kernel.git/commit
sysfs: fix error handling in binattr write()
authorTejun Heo <htejun@gmail.com>
Wed, 13 Jun 2007 18:45:13 +0000 (03:45 +0900)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 11 Jul 2007 23:09:03 +0000 (16:09 -0700)
commit19e6b172718bd604df6b3a88306985fe82e8b1c7
tree8f5bc27cd1d7b28cafd4dd2bdbaabf0f16feb6c8
parent1eff2c25c606cadbe207410c2d3cd2a002f56317
sysfs: fix error handling in binattr write()

Error handling in fs/sysfs/bin.c:write() was wrong because size_t
count is used to receive return value from flush_write() which is
negative on failure.

This patch updates write() such that int variable is used instead.
read() is updated the same way for consistency.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/sysfs/bin.c