usb: gadget: f_mass_storage: Fix the logic to iterate all common->luns
authorAxel Lin <axel.lin@ingics.com>
Fri, 7 Jul 2017 04:22:00 +0000 (12:22 +0800)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Mon, 17 Jul 2017 08:00:06 +0000 (11:00 +0300)
commitbee91869436dfb0e444139a52228cef0ce758cd8
tree83f845961edf7beb674193b65aa221169e7f21ff
parentee249b4554947de3be77be4e9e6077b20c0fe055
usb: gadget: f_mass_storage: Fix the logic to iterate all common->luns

It is wrong to do --i in the for loop.

Fixes: dd02ea5a3305 ("usb: gadget: mass_storage: Use static array for luns")
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Reviewed-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/gadget/function/f_mass_storage.c