From bdefd950601ccfc776ffafe482bc93689456629d Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 20 Jan 2009 15:51:16 -0800 Subject: [PATCH] --- yaml --- r: 130095 b: refs/heads/master c: 4503efd0891c40e30928afb4b23dc3f99c62a6b2 h: refs/heads/master i: 130093: 5c0810f6c00155c9a4d1a028d7652c4146e61ea3 130091: 0dff31bb4cf280b13988ce0e3fa596ed00fe363b 130087: cbaf71d13ac5a4042b2795dc0a9c44cfd88bea7c 130079: 57fa3f2f3d7229778ade4b9624c3c96ded6e52ff v: v3 --- [refs] | 2 +- trunk/fs/sysfs/bin.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 189ea046bb9c..d7699a520f6d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 72638f598ec9f05a43fcb22dc1dd8dc34c43acc1 +refs/heads/master: 4503efd0891c40e30928afb4b23dc3f99c62a6b2 diff --git a/trunk/fs/sysfs/bin.c b/trunk/fs/sysfs/bin.c index 66f6e58a7e4b..f2c478c3424e 100644 --- a/trunk/fs/sysfs/bin.c +++ b/trunk/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;