The patch titled LED: Fix sysfs store function error handling has been removed from the -mm tree. Its filename is led-fix-sysfs-store-function-error-handling.patch This patch was probably dropped from -mm because it has now been merged into a subsystem tree or into Linus's tree, or because it was folded into its parent patch in the -mm tree. From: Richard Purdie <rpurdie@xxxxxxxxx> Fix the error handling of some LED _store functions. This corrects them to return -EINVAL if the value is not numeric with an optional byte of trailing whitespace. Signed-off-by: Richard Purdie <rpurdie@xxxxxxxxx> Cc: Greg KH <greg@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- drivers/leds/led-class.c | 9 +++++++-- drivers/leds/ledtrig-timer.c | 17 +++++++++++++---- 2 files changed, 20 insertions(+), 6 deletions(-) diff -puN drivers/leds/led-class.c~led-fix-sysfs-store-function-error-handling drivers/leds/led-class.c --- devel/drivers/leds/led-class.c~led-fix-sysfs-store-function-error-handling 2006-05-15 09:43:27.000000000 -0700 +++ devel-akpm/drivers/leds/led-class.c 2006-05-15 09:43:27.000000000 -0700 @@ -19,6 +19,7 @@ #include <linux/sysdev.h> #include <linux/timer.h> #include <linux/err.h> +#include <linux/ctype.h> #include <linux/leds.h> #include "leds.h" @@ -43,9 +44,13 @@ static ssize_t led_brightness_store(stru ssize_t ret = -EINVAL; char *after; unsigned long state = simple_strtoul(buf, &after, 10); + size_t count = after - buf; - if (after - buf > 0) { - ret = after - buf; + if (*after && isspace(*after)) + count++; + + if (count == size) { + ret = count; led_set_brightness(led_cdev, state); } diff -puN drivers/leds/ledtrig-timer.c~led-fix-sysfs-store-function-error-handling drivers/leds/ledtrig-timer.c --- devel/drivers/leds/ledtrig-timer.c~led-fix-sysfs-store-function-error-handling 2006-05-15 09:43:27.000000000 -0700 +++ devel-akpm/drivers/leds/ledtrig-timer.c 2006-05-15 09:43:27.000000000 -0700 @@ -20,6 +20,7 @@ #include <linux/device.h> #include <linux/sysdev.h> #include <linux/timer.h> +#include <linux/ctype.h> #include <linux/leds.h> #include "leds.h" @@ -69,11 +70,15 @@ static ssize_t led_delay_on_store(struct int ret = -EINVAL; char *after; unsigned long state = simple_strtoul(buf, &after, 10); + size_t count = after - buf; - if (after - buf > 0) { + if (*after && isspace(*after)) + count++; + + if (count == size) { timer_data->delay_on = state; mod_timer(&timer_data->timer, jiffies + 1); - ret = after - buf; + ret = count; } return ret; @@ -97,11 +102,15 @@ static ssize_t led_delay_off_store(struc int ret = -EINVAL; char *after; unsigned long state = simple_strtoul(buf, &after, 10); + size_t count = after - buf; + + if (*after && isspace(*after)) + count++; - if (after - buf > 0) { + if (count == size) { timer_data->delay_off = state; mod_timer(&timer_data->timer, jiffies + 1); - ret = after - buf; + ret = count; } return ret; _ Patches currently in -mm which might be from rpurdie@xxxxxxxxx are origin.patch via-pmu-add-input-device.patch via-pmu-add-input-device-tidy.patch git-mtd.patch zlib_inflate-upgrade-library-code-to-a-recent-version.patch zlib_inflate-upgrade-library-code-to-a-recent-version-fix.patch leds-amstrad-delta-led-support.patch leds-amstrad-delta-led-support-tidy.patch rewritten-backlight-infrastructure-for-portable-apple-computers.patch backlight-locomo-backlight-driver-updates.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html