mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
thunderbolt: Add the missed ida_simple_remove() in ring_request_msix()
commit 7342ca34d931a357d408aaa25fadd031e46af137 upstream.
ring_request_msix() misses to call ida_simple_remove() in an error path.
Add a label 'err_ida_remove' and jump to it.
Fixes: 046bee1f9a ("thunderbolt: Add MSI-X support")
Cc: [email protected]
Signed-off-by: Jing Xiangfeng <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
Signed-off-by: Mika Westerberg <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
06c1895fe7
commit
1654bf2d9f
1 changed files with 15 additions and 4 deletions
|
|
@ -410,12 +410,23 @@ static int ring_request_msix(struct tb_ring *ring, bool no_suspend)
|
|||
|
||||
ring->vector = ret;
|
||||
|
||||
ring->irq = pci_irq_vector(ring->nhi->pdev, ring->vector);
|
||||
if (ring->irq < 0)
|
||||
return ring->irq;
|
||||
ret = pci_irq_vector(ring->nhi->pdev, ring->vector);
|
||||
if (ret < 0)
|
||||
goto err_ida_remove;
|
||||
|
||||
ring->irq = ret;
|
||||
|
||||
irqflags = no_suspend ? IRQF_NO_SUSPEND : 0;
|
||||
return request_irq(ring->irq, ring_msix, irqflags, "thunderbolt", ring);
|
||||
ret = request_irq(ring->irq, ring_msix, irqflags, "thunderbolt", ring);
|
||||
if (ret)
|
||||
goto err_ida_remove;
|
||||
|
||||
return 0;
|
||||
|
||||
err_ida_remove:
|
||||
ida_simple_remove(&nhi->msix_ida, ring->vector);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void ring_release_msix(struct tb_ring *ring)
|
||||
|
|
|
|||
Loading…
Reference in a new issue