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

Commit e0b64ce6 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Felipe Balbi
Browse files

usb: renesas_usbhs: mod_host: fixup usbhsh_ureq_free() timing



usbhsh_ureq_free() free ureq which includes ubshs_pkt.
But current driver used usbhs_pkt after freed ureq.
This patch fixup this bug.
Special thanks to Chen

Reported-by: default avatarChen Gang <gang.chen@asianux.com>
Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent d9fa298f
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -661,9 +661,10 @@ static void usbhsh_queue_done(struct usbhs_priv *priv, struct usbhs_pkt *pkt)
		status = -ESHUTDOWN;

	urb->actual_length = pkt->actual;
	usbhsh_ureq_free(hpriv, ureq);

	usbhsh_endpoint_sequence_save(hpriv, urb, pkt);
	usbhsh_ureq_free(hpriv, ureq);

	usbhsh_pipe_detach(hpriv, usbhsh_ep_to_uep(urb->ep));

	usb_hcd_unlink_urb_from_ep(hcd, urb);