]> git.baikalelectronics.ru Git - kernel.git/commit
usb: gadget: uvc: preserve the address passed to kfree()
authorAndrzej Pietrasiewicz <andrzej.p@samsung.com>
Fri, 16 Jan 2015 14:14:27 +0000 (15:14 +0100)
committerFelipe Balbi <balbi@ti.com>
Mon, 19 Jan 2015 18:54:22 +0000 (12:54 -0600)
commit2c596fb2e97ca4374ca60f86e6d00e1dea6b12d6
treef4bb0030c473818065a5b2ffc3754ec1e7f3b890
parent2f51c481afbaeae69947f2a5877345dbb71287cf
usb: gadget: uvc: preserve the address passed to kfree()

__uvcg_fill_strm() called from __uvcg_iter_stream_cls()
might have advanced the "data" even if __uvcg_iter_stream_cls()
returns an error, so use a backup copy as an argument to kfree().

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/function/uvc_configfs.c