Преглед изворни кода

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: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Felipe Balbi пре 8 година
родитељ
комит
f45e2a0211
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      drivers/usb/host/xhci-ring.c

+ 1 - 1
drivers/usb/host/xhci-ring.c

@@ -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)) {