Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 85b06f5e authored by Dan Carpenter's avatar Dan Carpenter Committed by Felipe Balbi
Browse files

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: 6d5c1c77 ('usb: gadget: f_fs: fix the redundant ep files problem')
Acked-by: default avatarMichal Nazarewicz <mina86@mina86.com>
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 13443799
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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)