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

Commit 1b772e5c authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: android: Fix possible race in terms of using ffs_function"

parents f2437a7f b900f7d3
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -678,11 +678,14 @@ static void functionfs_closed_callback(struct ffs_data *ffs)
	config->opened = false;
	config->data = NULL;

	if (config->func) {
		usb_put_function(config->func);
		config->func = NULL;
	}

	if (dev)
		mutex_unlock(&dev->mutex);

	if (config->func)
		usb_put_function(config->func);
}

/* ACM */