diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-09-13 00:02:18 (GMT) |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-09-13 00:02:18 (GMT) |
commit | 9277bf4b4f94655eef177d0daffa90a47c51eb62 (patch) | |
tree | 569b5a13b3f7030a603460d8d9ded035a6f7f48f /kernel/pm_qos_params.c | |
parent | 897493504addc5609f04a2c4f73c37ab972c29b2 (diff) | |
parent | 49553c2ef88749dd502687f4eb9c258bb10a4f44 (diff) | |
download | linux-fsl-qoriq-9277bf4b4f94655eef177d0daffa90a47c51eb62.tar.xz |
Merge remote branch 'linus' into drm-intel-fixes
Diffstat (limited to 'kernel/pm_qos_params.c')
-rw-r--r-- | kernel/pm_qos_params.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/pm_qos_params.c b/kernel/pm_qos_params.c index b7e4c36..645e541 100644 --- a/kernel/pm_qos_params.c +++ b/kernel/pm_qos_params.c @@ -389,10 +389,12 @@ static ssize_t pm_qos_power_write(struct file *filp, const char __user *buf, } else if (count == 11) { /* len('0x12345678/0') */ if (copy_from_user(ascii_value, buf, 11)) return -EFAULT; + if (strlen(ascii_value) != 10) + return -EINVAL; x = sscanf(ascii_value, "%x", &value); if (x != 1) return -EINVAL; - pr_debug(KERN_ERR "%s, %d, 0x%x\n", ascii_value, x, value); + pr_debug("%s, %d, 0x%x\n", ascii_value, x, value); } else return -EINVAL; |