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

Signed-off-by: Felipe Balbi <felipe.ba...@linux.intel.com>
---
 drivers/usb/host/xhci-ring.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index 64d9fc490f80..397a74a4ea82 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -601,7 +601,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)) {
-- 
2.10.1

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to