| From 06b343e6491daae63773eb5ef03d90596a4ddf96 Mon Sep 17 00:00:00 2001 |
| From: Felipe Balbi <felipe.balbi@linux.intel.com> |
| Date: Mon, 23 Jan 2017 14:20:13 +0200 |
| Subject: [PATCH 200/255] 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> |
| (cherry picked from commit f45e2a02112a1ed03925521c9f48e4bdc25c7032) |
| Signed-off-by: Simon Horman <horms+renesas@verge.net.au> |
| --- |
| drivers/usb/host/xhci-ring.c | 2 +- |
| 1 file changed, 1 insertion(+), 1 deletion(-) |
| |
| --- a/drivers/usb/host/xhci-ring.c |
| +++ b/drivers/usb/host/xhci-ring.c |
| @@ -655,7 +655,7 @@ static void xhci_unmap_td_bounce_buffer( |
| 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)) { |