diff options
author | Felipe Balbi <felipe.balbi@linux.intel.com> | 2017-01-23 15:20:13 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-01-25 12:59:06 +0300 |
commit | f45e2a02112a1ed03925521c9f48e4bdc25c7032 (patch) | |
tree | 06af319075af4bf9058b8e93b27ebcddb90d59c5 /drivers/usb/host | |
parent | f3899a28e2b8a6f208187033789ac0f038d3c08e (diff) | |
download | linux-f45e2a02112a1ed03925521c9f48e4bdc25c7032.tar.xz |
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>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r-- | drivers/usb/host/xhci-ring.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index 9084afb97a58..0de9966451f9 100644 --- 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_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)) { |