From 74afa8578c5c0d4bc1979e6224e700e3718815a6 Mon Sep 17 00:00:00 2001 From: Shaun Ruffell Date: Tue, 17 Aug 2010 17:15:47 +0000 Subject: wcte12xp: Clean up -vpm workqueue if there is not a VPMADT032 installed. DAHDI-681. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9145 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- drivers/dahdi/wcte12xp/base.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/dahdi/wcte12xp/base.c b/drivers/dahdi/wcte12xp/base.c index 46cd955..f67c3b6 100644 --- a/drivers/dahdi/wcte12xp/base.c +++ b/drivers/dahdi/wcte12xp/base.c @@ -1452,12 +1452,13 @@ static int check_and_load_vpm(struct t1 *wc) res = vpmadt032_init(wc->vpmadt032, &wc->vb); if (-ENODEV == res) { + struct vpmadt032 *vpm = wc->vpmadt032; /* There does not appear to be a VPMADT032 installed. */ clear_bit(4, &wc->ctlreg); spin_lock_irqsave(&wc->reglock, flags); wc->vpmadt032 = NULL; spin_unlock_irqrestore(&wc->reglock, flags); - vpmadt032_free(wc->vpmadt032); + vpmadt032_free(vpm); return res; } else if (res) { -- cgit v1.2.3