xhci: Fix ring leak in failure path of xhci_alloc_virt_device()
Subsystems (2)
Quoted 4 lines · Ben Hutchings
This is a stable-only fix for the backport of commit
5d9b70f7d52e("xhci: Don't add avirt_devto the devs array before it's fully allocated").
Quoted 8 lines
In branches that predate commit
c5628a2af83a("xhci: remove endpoint ring cache") there is an additional failure path inxhci_alloc_virt_device()where ring cache allocation fails, in which case we need to free the ring allocated for endpoint 0.Signed-off-by Ben Hutchings <[email protected]>---
This is build-tested only.
Looks good to me, thanks for this!
Mathias, yell if you think it's wrong :)
greg k-h
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html