diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2014-09-09 15:06:09 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-10-15 12:29:24 +0200 |
commit | 6ed8a450f618ebca47b03c59c6975cfd76790542 (patch) | |
tree | 3fe28db3e3a8998b37c8de82e82e9d26bef082c0 | |
parent | 3842f8ec4ac6df95afbbed484d7701f2caf6bf86 (diff) |
usb: gadget: f_fs: signedness bug in __ffs_func_bind_do_descs()
commit 85b06f5e53d17c15844ef3cd45d0c7107f0ae45c upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/usb/gadget/function/f_fs.c | 3 |
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 0dc3552d1360..7ad7137ba39a 100644 --- a/drivers/usb/gadget/function/f_fs.c +++ b/drivers/usb/gadget/function/f_fs.c @@ -2393,7 +2393,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) |