]> git.karo-electronics.de Git - linux-beck.git/commit
usb: gadget: f_fs: Fix iterations on endpoints.
authorVincent Pelletier <plr.vincent@gmail.com>
Mon, 9 Jan 2017 13:46:00 +0000 (13:46 +0000)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Thu, 12 Jan 2017 08:00:30 +0000 (10:00 +0200)
commit08f37148b6a915a6996c7dbef87769b9efee2dba
tree7779671975d52ece5ebda1f48a9bc4a7b2e408e4
parent9383e084a88d04d442ea2dce128edff05f344e5c
usb: gadget: f_fs: Fix iterations on endpoints.

When zero endpoints are declared for a function, there is no endpoint
to disable, enable or free, so replace do...while loops with while loops.
Change pre-decrement to post-decrement to iterate the same number of times
when there are endpoints to process.

Signed-off-by: Vincent Pelletier <plr.vincent@gmail.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/gadget/function/f_fs.c