Commit 7cb87888 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] sysfs: fill_read_buffer() fix

This BUG_ON() triggers for `count = -EFOO' due to PAGE_SIZE being unsigned.
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 36bc33ba
......@@ -89,7 +89,7 @@ static int fill_read_buffer(struct file * file, struct sysfs_buffer * buffer)
return -ENOMEM;
count = ops->show(kobj,attr,buffer->page);
BUG_ON(count > PAGE_SIZE);
BUG_ON(count > (ssize_t)PAGE_SIZE);
if (count >= 0)
buffer->count = count;
else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment