From: Andrzej Pietrasiewicz Date: Thu, 15 May 2014 11:43:50 +0000 (+0200) Subject: usb: gadget: f_uac2: don't queue new requests when shutting down X-Git-Tag: omap-for-v3.16/fixes-against-rc1~39^2~34^2~171^2~7 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1ade5d7e179170e3cf4780ba578ebb8cc7aa15ef;p=pandora-kernel.git usb: gadget: f_uac2: don't queue new requests when shutting down In some circumstances when g_audio is being unloaded there happens an endless loop in udc driver. It has happend on a board with s3c-hsotg. If there are requests in endpoint's queue, they are completed in a loop. But completing them might cause appending new requests to the queue. This patch causes agdev_iso_complete() to return immediately if request's status is -ESHUTDOWN. If it does not return immediately, then although the current request is removed from the queue, a new one is appended to the queue, so the above mentioned loop cannot end. Signed-off-by: Andrzej Pietrasiewicz Signed-off-by: Felipe Balbi --- Reading git-diff-tree failed