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

Skip to content
Commit 05e78c69 authored by Felix Hädicke's avatar Felix Hädicke Committed by Felipe Balbi
Browse files

usb: gadget: f_fs: fix wrong parenthesis in ffs_func_req_match()



Properly check the return code of ffs_func_revmap_intf() and
ffs_func_revmap_ep() for a non-negative value.

Instead of checking the return code, the comparison was performed for the last
parameter of the function calls, because of wrong parenthesis.

This also fixes the following static checker warning:
drivers/usb/gadget/function/f_fs.c:3152 ffs_func_req_match()
warn: always true condition '(((creq->wIndex)) >= 0) => (0-u16max >= 0)'

Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarFelix Hädicke <felixhaedicke@web.de>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent a25f0944
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment