diff options
Diffstat (limited to 'drivers/staging/android/timed_output.c')
-rw-r--r-- | drivers/staging/android/timed_output.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/staging/android/timed_output.c b/drivers/staging/android/timed_output.c index 62e7918..f373422 100644 --- a/drivers/staging/android/timed_output.c +++ b/drivers/staging/android/timed_output.c @@ -41,7 +41,9 @@ static ssize_t enable_store( struct timed_output_dev *tdev = dev_get_drvdata(dev); int value; - sscanf(buf, "%d", &value); + if (sscanf(buf, "%d", &value) != 1) + return -EINVAL; + tdev->enable(tdev, value); return size; |