Message ID | 20131023182609.6646b5c0@tom-ThinkPad-T410 (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c index 5d818df..366ae8d 100644 --- a/fs/sysfs/file.c +++ b/fs/sysfs/file.c @@ -277,7 +277,7 @@ static ssize_t sysfs_write_file(struct file *file, const char __user *user_buf, ssize_t len = min_t(size_t, count, PAGE_SIZE); char *buf; - if (sysfs_is_bin(of->sd)) { + if (sysfs_is_bin(of->sd) && size) { loff_t size = file_inode(file)->i_size; if (size <= *ppos)