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

Commit f45e2a02 authored by Felipe Balbi's avatar Felipe Balbi Committed by Greg Kroah-Hartman
Browse files

usb: host: xhci: check for a valid ring when unmapping bounce buffer



This way we can remove checks for valid ring from call sites of
xhci_unmap_td_bounce_buffer()

Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: default avatarMathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f3899a28
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -655,7 +655,7 @@ static void xhci_unmap_td_bounce_buffer(struct xhci_hcd *xhci,
	struct xhci_segment *seg = td->bounce_seg;
	struct urb *urb = td->urb;

	if (!seg || !urb)
	if (!ring || !seg || !urb)
		return;

	if (usb_urb_dir_out(urb)) {