xhci: Fix ring leak in failure path of xhci_alloc_virt_device()
BugLink: http://bugs.launchpad.net/bugs/1745266 This is a stable-only fix for the backport of commit 5d9b70f7 ("xhci: Don't add a virt_dev to the devs array before it's fully allocated"). In branches that predate commit c5628a2a ("xhci: remove endpoint ring cache") there is an additional failure path in xhci_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 <ben.hutchings@codethink.co.uk> Cc: Mathias Nyman <mathias.nyman@intel.com> Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com> Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Showing
Please register or sign in to comment