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

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

Merge "usb: gadget: u_audio: Check return value from config_ep_by_speed()"

parents f1af8c5d 108c8412
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -380,11 +380,14 @@ int u_audio_start_capture(struct g_audio *audio_dev)
	struct usb_ep *ep;
	struct uac_rtd_params *prm;
	struct uac_params *params = &audio_dev->params;
	int req_len, i;
	int req_len, i, ret;

	ep = audio_dev->out_ep;
	prm = &uac->c_prm;
	config_ep_by_speed(gadget, &audio_dev->func, ep);
	ret = config_ep_by_speed(gadget, &audio_dev->func, ep);
	if (ret)
		return ret;

	req_len = prm->max_psize;

	prm->ep_enabled = true;
@@ -433,11 +436,13 @@ int u_audio_start_playback(struct g_audio *audio_dev)
	struct uac_params *params = &audio_dev->params;
	unsigned int factor, rate;
	const struct usb_endpoint_descriptor *ep_desc;
	int req_len, i;
	int req_len, i, ret;

	ep = audio_dev->in_ep;
	prm = &uac->p_prm;
	config_ep_by_speed(gadget, &audio_dev->func, ep);
	ret = config_ep_by_speed(gadget, &audio_dev->func, ep);
	if (ret)
		return ret;

	ep_desc = ep->desc;