]> Git Repo - linux.git/commitdiff
EDAC, thunderx: Fix memory leak in thunderx_l2c_threaded_isr()
authorDan Carpenter <[email protected]>
Sat, 13 Oct 2018 10:28:43 +0000 (13:28 +0300)
committerBorislav Petkov <[email protected]>
Sat, 13 Oct 2018 11:58:06 +0000 (13:58 +0200)
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
drivers/edac/thunderx_edac.c

index c009d94f40c52982546fd8354c0b613d0b30237c..34be60fe68922100bac7f2ae4a7dc1b50c8ad419 100644 (file)
@@ -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);
This page took 0.060575 seconds and 4 git commands to generate.