summaryrefslogtreecommitdiff
path: root/drivers/usb/chipidea/debug.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-03-02 03:38:16 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-03-02 03:38:16 +0300
commit523462df282fc527a01bceca5125017e2259fbf5 (patch)
treeb3cca26b719ce1f46f203e2f86334525a2f50e14 /drivers/usb/chipidea/debug.c
parent35bf7692e765c2275bf93fe573f7ca868ab73453 (diff)
parentfc77dbd34c5c99bce46d40a2491937c3bcbd10af (diff)
downloadlinux-523462df282fc527a01bceca5125017e2259fbf5.tar.xz
Merge 4.5-rc6 into char-misc-next
We want the fixes in here, and others are sending us pull requests based on this kernel tree. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/chipidea/debug.c')
-rw-r--r--drivers/usb/chipidea/debug.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/chipidea/debug.c b/drivers/usb/chipidea/debug.c
index a4f7db2e18dd..df47110bad2d 100644
--- a/drivers/usb/chipidea/debug.c
+++ b/drivers/usb/chipidea/debug.c
@@ -100,6 +100,9 @@ static ssize_t ci_port_test_write(struct file *file, const char __user *ubuf,
if (sscanf(buf, "%u", &mode) != 1)
return -EINVAL;
+ if (mode > 255)
+ return -EBADRQC;
+
pm_runtime_get_sync(ci->dev);
spin_lock_irqsave(&ci->lock, flags);
ret = hw_port_test_set(ci, mode);