cxl: Release irqs if memory allocation fails
authorVaibhav Jain <vaibhav@linux.vnet.ibm.com>
Tue, 25 Aug 2015 05:34:48 +0000 (11:04 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 27 Aug 2015 03:51:18 +0000 (13:51 +1000)
commita6897f39660cc07fa78b4459d82f12b07abb50b1
tree65e2cdb08682a98de731de244ca79656972e327c
parentf47f966fbe0aaff4ebbdb83d95acdfa5d3c20477
cxl: Release irqs if memory allocation fails

This minor patch plugs a potential irq leak in case of a memory
allocation failure inside function the afu_allocate_irqs. Presently the
irqs allocated to the context gets leaked if allocation of either
one of context irq_bitmap or irq_names fails.

Signed-off-by: Vaibhav Jain <vaibhav@linux.vnet.ibm.com>
Acked-by: Ian Munsie <imunsie@au1.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
drivers/misc/cxl/irq.c