diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-26 19:40:28 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-26 19:40:28 +0100 |
commit | ed803862954528e6fcf7bd0f2b2e5a772a7c3281 (patch) | |
tree | fce02fe5ebc10a5a8da5e034e2bb25d79d07a808 /fs/sysfs | |
parent | m68k{nommu}: fixups after the header move (diff) | |
parent | klist.c: bit 0 in pointer can't be used as flag (diff) | |
download | linux-ed803862954528e6fcf7bd0f2b2e5a772a7c3281.tar.xz linux-ed803862954528e6fcf7bd0f2b2e5a772a7c3281.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6:
klist.c: bit 0 in pointer can't be used as flag
debugfs: introduce stub for debugfs_create_size_t() when DEBUG_FS=n
sysfs: fix problems with binary files
PNP: fix broken pnp lowercasing for acpi module aliases
driver core: Convert '/' to '!' in dev_set_name()
Diffstat (limited to 'fs/sysfs')
-rw-r--r-- | fs/sysfs/bin.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/sysfs/bin.c b/fs/sysfs/bin.c index 66f6e58a7e4b..f2c478c3424e 100644 --- a/fs/sysfs/bin.c +++ b/fs/sysfs/bin.c @@ -63,6 +63,9 @@ read(struct file *file, char __user *userbuf, size_t bytes, loff_t *off) int count = min_t(size_t, bytes, PAGE_SIZE); char *temp; + if (!bytes) + return 0; + if (size) { if (offs > size) return 0; @@ -131,6 +134,9 @@ static ssize_t write(struct file *file, const char __user *userbuf, int count = min_t(size_t, bytes, PAGE_SIZE); char *temp; + if (!bytes) + return 0; + if (size) { if (offs > size) return 0; |