summaryrefslogtreecommitdiff
path: root/drivers/usb/host/xhci-ring.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-08-10 10:01:33 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-08-10 10:01:33 -0700
commite6bbe1d05353a29628a4ca72d88bac0bdcec5f38 (patch)
treed662a065cfa9f0e32145887e46947d29a89d9f9d /drivers/usb/host/xhci-ring.c
parent7e34d70a7163b236f520ef4fc0d7c50093dd3746 (diff)
parentf7644cbfcdf03528f0f450f3940c4985b2291f49 (diff)
Merge 4.2-rc6 into usb-next
We want the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/xhci-ring.c')
-rw-r--r--drivers/usb/host/xhci-ring.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index 5fbf33987a85..a47a1e897086 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -82,7 +82,7 @@ dma_addr_t xhci_trb_virt_to_dma(struct xhci_segment *seg,
return 0;
/* offset in TRBs */
segment_offset = trb - seg->trbs;
- if (segment_offset > TRBS_PER_SEGMENT)
+ if (segment_offset >= TRBS_PER_SEGMENT)
return 0;
return seg->dma + (segment_offset * sizeof(*trb));
}