]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/usb/host/xhci-mem.c
xhci: xhci-mem: off by one in xhci_stream_id_to_ring()
[mirror_ubuntu-bionic-kernel.git] / drivers / usb / host / xhci-mem.c
index a8e9ca1ea5417344854ed2ad75e5a4b97ccc9f9d..37516897b14f4630fd65b7ede4e47a90adec4270 100644 (file)
@@ -591,7 +591,7 @@ struct xhci_ring *xhci_stream_id_to_ring(
        if (!ep->stream_info)
                return NULL;
 
-       if (stream_id > ep->stream_info->num_streams)
+       if (stream_id >= ep->stream_info->num_streams)
                return NULL;
        return ep->stream_info->stream_rings[stream_id];
 }