]> git.baikalelectronics.ru Git - kernel.git/commit
usb: gadget: uvc: improve sg exit condition
authorMichael Grzeschik <m.grzeschik@pengutronix.de>
Sat, 2 Apr 2022 23:27:44 +0000 (01:27 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 21 Apr 2022 16:15:33 +0000 (18:15 +0200)
commit1b3fc8211feb81f978dd356b6f8371d811385c76
tree3d81dfaf993b1fc77633ca83588cb0f77bc9cc3d
parent53d0f16123889e6b53d508760f7e32d1512aebd4
usb: gadget: uvc: improve sg exit condition

The exit condition to quit iterating over the sg_list, while encoding
the sg entries, has to consider the case that the dma_len of the entry
could be zero. This patch takes this condition to account.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Link: https://lore.kernel.org/r/20220402232744.3622565-4-m.grzeschik@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/function/uvc_video.c