Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 364eb6aa authored by Liangliang Lu's avatar Liangliang Lu Committed by Gerrit - the friendly Code Review server
Browse files

usb: gadget: f_fs: Do not match when function do not bind



Ep0 interrupt bottom half may execute after f_fs unbind.
Return false if function already unbind.

Change-Id: I66864400cea2ce4ae4596b966194f9235835dfee
Signed-off-by: default avatarLiangliang Lu <luliang@codeaurora.org>
parent 5485c33a
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -3546,6 +3546,11 @@ static bool ffs_func_req_match(struct usb_function *f,
{
	struct ffs_function *func = ffs_func_from_usb(f);

	if (!test_bit(FFS_FL_BOUND, &func->ffs->flags)) {
		ffs_log("ffs function do not bind yet.\n");
		return false;
	}

	if (config0 && !(func->ffs->user_flags & FUNCTIONFS_CONFIG0_SETUP))
		return false;