X-Git-Url: https://git.stricted.de/?p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git;a=blobdiff_plain;f=drivers%2Fusb%2Fhost%2Fxhci-ring.c;h=d52c1653ce658f0d7cf60a467044d58ebcdd3de5;hp=11e6e52c0c97d4d10f7f11e45fb8c25dd7fbf216;hb=3460ea59c67f92c0e873e00e2508c88fb1955988;hpb=45f8c76c719654a77b4fdfc5dfbdf8a3cf3bb664 diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index 11e6e52c0c97..d52c1653ce65 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c @@ -85,7 +85,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)); }