Currently during endpoint initialization, a new endpoint ring is alloacte
using xhci_ring_alloc(), if this function fails to allocate ring a cached
ring(if available) is assigned to endpoint ring.
This patch modifies the code that during endpoint initialization, if cached
ring is available it is assigned to the endpoint ring. If cached rings are
not available then xhci_ring_alloc() is called to allocate a new ring.
Doing so will avoid unncessary memory allocations if cached ring is already
available for use. This also fixes endpoint "Ring expansion failed" error
which occurs due to insufficient memory during ring expansion.
Signed-off-by: Anurag Kumar Vulisha <anuragku@xxxxxxxxxx>