usb: gadget: uvc: configfs: Drop leaked references to config items
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Wed, 1 Aug 2018 21:14:00 +0000 (00:14 +0300)
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Mon, 24 Sep 2018 15:54:13 +0000 (18:54 +0300)
commit86f3daed59bceb4fa7981d85e89f63ebbae1d561
tree6f506e44cfac3b0c8155120d37987bce03cb6d84
parentf7d8109e31bbe785b13c8cfdafc56e9351bccef1
usb: gadget: uvc: configfs: Drop leaked references to config items

Some of the .allow_link() and .drop_link() operations implementations
call config_group_find_item() and then leak the reference to the
returned item. Fix this by dropping those references where needed.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
drivers/usb/gadget/function/uvc_configfs.c