From b6eb7ae6d8c34ba57b1138b5970a1ce148fdf4f9 Mon Sep 17 00:00:00 2001 From: Shaun Ruffell Date: Tue, 1 Apr 2014 11:53:00 -0500 Subject: [PATCH] wcte43xp: Close potential unbalanced call to enable_irq(). If the memory allocation for the new channel array fails, it would be possible to call enable_irq() without the corresponding call to disable_irq(). Signed-off-by: Shaun Ruffell --- drivers/dahdi/wcte43x-base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dahdi/wcte43x-base.c b/drivers/dahdi/wcte43x-base.c index bb68183..e0f8968 100644 --- a/drivers/dahdi/wcte43x-base.c +++ b/drivers/dahdi/wcte43x-base.c @@ -2454,6 +2454,7 @@ t43x_init_one_span(struct t43x *wc, struct t43x_span *ts, enum linemode type) default: spin_unlock_irqrestore(&wc->reglock, flags); res = -EINVAL; + enable_irq(wc->xb.pdev->irq); goto error_exit; } @@ -2476,7 +2477,6 @@ t43x_init_one_span(struct t43x *wc, struct t43x_span *ts, enum linemode type) return 0; error_exit: - enable_irq(wc->xb.pdev->irq); for (x = 0; x < ARRAY_SIZE(chans); ++x) { kfree(chans[x]);