aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Carpenter <[email protected]>2018-10-13 13:28:43 +0300
committerBorislav Petkov <[email protected]>2018-10-13 13:58:06 +0200
commitd8c27ba86a2fd806d3957e5a9b30e66dfca2a61d (patch)
tree3b2fca3d244f7a563a39bf6f8cac26819c863abc
parent8f18973877204dc8ca4ce1004a5d28683b9a7086 (diff)
EDAC, thunderx: Fix memory leak in thunderx_l2c_threaded_isr()
Fix memory leak in L2c threaded interrupt handler. [ bp: Rewrite commit message. ] Fixes: 41003396f932 ("EDAC, thunderx: Add Cavium ThunderX EDAC driver") Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> CC: David Daney <[email protected]> CC: Jan Glauber <[email protected]> CC: Mauro Carvalho Chehab <[email protected]> CC: Sergey Temerkhanov <[email protected]> CC: linux-edac <[email protected]> Link: http://lkml.kernel.org/r/20181013102843.GG16086@mwanda
-rw-r--r--drivers/edac/thunderx_edac.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/edac/thunderx_edac.c b/drivers/edac/thunderx_edac.c
index c009d94f40c5..34be60fe6892 100644
--- a/drivers/edac/thunderx_edac.c
+++ b/drivers/edac/thunderx_edac.c
@@ -1884,7 +1884,7 @@ static irqreturn_t thunderx_l2c_threaded_isr(int irq, void *irq_id)
default:
dev_err(&l2c->pdev->dev, "Unsupported device: %04x\n",
l2c->pdev->device);
- return IRQ_NONE;
+ goto err_free;
}
while (CIRC_CNT(l2c->ring_head, l2c->ring_tail,
@@ -1906,7 +1906,7 @@ static irqreturn_t thunderx_l2c_threaded_isr(int irq, void *irq_id)
l2c->ring_tail++;
}
- return IRQ_HANDLED;
+ ret = IRQ_HANDLED;
err_free:
kfree(other);