summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/function/f_fs.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2014-09-09 15:06:09 +0300
committerFelipe Balbi <balbi@ti.com>2014-09-09 09:51:21 -0500
commit85b06f5e53d17c15844ef3cd45d0c7107f0ae45c (patch)
tree622b0f357dba7e623ed2b3cb205041e42223786c /drivers/usb/gadget/function/f_fs.c
parent13443799b559cde593826091a7de135483b245e5 (diff)
downloadlinux-stable-85b06f5e53d17c15844ef3cd45d0c7107f0ae45c.tar.gz
linux-stable-85b06f5e53d17c15844ef3cd45d0c7107f0ae45c.tar.bz2
linux-stable-85b06f5e53d17c15844ef3cd45d0c7107f0ae45c.zip
usb: gadget: f_fs: signedness bug in __ffs_func_bind_do_descs()
We need "idx" to be signed for the error handling to work. Fixes: 6d5c1c77bbf9 ('usb: gadget: f_fs: fix the redundant ep files problem') Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/function/f_fs.c')
-rw-r--r--drivers/usb/gadget/function/f_fs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c
index dc30adf15a01..1aad353c1f11 100644
--- a/drivers/usb/gadget/function/f_fs.c
+++ b/drivers/usb/gadget/function/f_fs.c
@@ -2352,7 +2352,8 @@ static int __ffs_func_bind_do_descs(enum ffs_entity_type type, u8 *valuep,
struct usb_endpoint_descriptor *ds = (void *)desc;
struct ffs_function *func = priv;
struct ffs_ep *ffs_ep;
- unsigned ep_desc_id, idx;
+ unsigned ep_desc_id;
+ int idx;
static const char *speed_names[] = { "full", "high", "super" };
if (type != FFS_DESCRIPTOR)