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)
commit06ab8b04d232c80cb4b23984290ce413058cc975
treef4bb0030c473818065a5b2ffc3754ec1e7f3b890
parent16272ae77e0f167af70eabd476059137d64569a8
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