]> git.baikalelectronics.ru Git - kernel.git/commit
usb: gadget: f_mass_storage: simplify start_transfer slightly
authorMichal Nazarewicz <mina86@mina86.com>
Wed, 27 Aug 2014 20:58:48 +0000 (22:58 +0200)
committerFelipe Balbi <balbi@ti.com>
Tue, 2 Sep 2014 14:16:47 +0000 (09:16 -0500)
commit3207013de4c59116e87681686545b912456081ac
tree81d62c68c8adb408e6371c96f351ec109cfc50b1
parentae7c28970e40c4aa847734f0f5e3e603bfb59554
usb: gadget: f_mass_storage: simplify start_transfer slightly

Flatten the start_transfer function by reversing the if condition and
returning early out of the function if everything went fine.  It makes
the function look less complicated, at least to me, and easier to
understand.

Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/function/f_mass_storage.c