usb: fixes for v4.9-rc5

One single fix for FunctionFS to make sure we're checking
 ffs_func_req_match()'s return code correctly.
 -----BEGIN PGP SIGNATURE-----
 
 iQJRBAABCAA7FiEElLzh7wn96CXwjh2IzL64meEamQYFAlgu61QdHGZlbGlwZS5i
 YWxiaUBsaW51eC5pbnRlbC5jb20ACgkQzL64meEamQYCAhAAtD4AhfBl/0AltGUf
 iypUdOYO25u6E8aGL4NvCPCqAixQNqEZEhhsm8sRTqkZhX4ScP0e4JRmUzScgwu7
 MqRlaWiB7E618R1zGxJfGw1GC2sQQbLChUfpCSja64dR+5FNzlo/rclHfINHaqFa
 NdcXkGeHO+fJVb3VDdnt6BTJVrRJ1lfhufv3pjbKgPwlgEZsexVkadSqqAvvxRaT
 v/7iFZRkESjXz5z0O48TDBbgToI44ZaGOTyBNPOx7FJjl04YhLE1UQ49GI/j+md0
 JiGBwWlmwoxWQFIOB87bYQGPZTqKjQQwww21d1n7xr8ATk6coqs3tas+ywryMwrr
 EtWWT00C+5IC4tVFWcKu97YpI+L+FUhxP0ZcdLj2GIAe0j66gNA/iMz5HzaIv6SH
 yJfy2hElcSeojw2nmDQKOl2KnTXpoM7KaTV8uOgiE+ALKke0XjVsqPiGAW8X94ze
 Mi6zaGmpeH9lgiRkk4H3MwO7wsqvB0AnZRDn8xhDF5bSmJXeivyW0AuMWQSM/ARM
 RWhIUhu12ieoptulSMlC1PcNOFQjFVckTCX1W07WN9Dq+T+2s2abJAaerTnB3O0O
 74gv90+rj3heX0yzbvgyFC1qr9bl+qHQ/gNvY83o+eg2wVXv5digghXf0yZdokE7
 RP36lwIJoXuzx+PYFUSzMzDmM9c=
 =sk4m
 -----END PGP SIGNATURE-----

Merge tag 'fixes-for-v4.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus

Felipe writes:

usb: fixes for v4.9-rc5

One single fix for FunctionFS to make sure we're checking
ffs_func_req_match()'s return code correctly.
This commit is contained in:
Greg Kroah-Hartman 2016-11-18 13:43:49 +01:00
commit 268200bcaf
1 changed files with 4 additions and 4 deletions

View File

@ -3225,11 +3225,11 @@ static bool ffs_func_req_match(struct usb_function *f,
switch (creq->bRequestType & USB_RECIP_MASK) {
case USB_RECIP_INTERFACE:
return ffs_func_revmap_intf(func,
le16_to_cpu(creq->wIndex) >= 0);
return (ffs_func_revmap_intf(func,
le16_to_cpu(creq->wIndex)) >= 0);
case USB_RECIP_ENDPOINT:
return ffs_func_revmap_ep(func,
le16_to_cpu(creq->wIndex) >= 0);
return (ffs_func_revmap_ep(func,
le16_to_cpu(creq->wIndex)) >= 0);
default:
return (bool) (func->ffs->user_flags &
FUNCTIONFS_ALL_CTRL_RECIP);