From db633b848b9e0cc6e154e8b5246b055c356dc866 Mon Sep 17 00:00:00 2001 From: sruffell Date: Fri, 19 Dec 2008 17:24:15 +0000 Subject: * Quiet a few new compilation warnings. * Do not release a spin_lock that we did not acquire. git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.4@4599 5390a7c7-147a-4af0-8ec9-7488f05a26cb --- kernel/wcte12xp/base.c | 10 +++++----- kernel/wcte12xp/vpmadt032.c | 3 ++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/kernel/wcte12xp/base.c b/kernel/wcte12xp/base.c index c8ea497..e90dda3 100644 --- a/kernel/wcte12xp/base.c +++ b/kernel/wcte12xp/base.c @@ -208,7 +208,7 @@ static inline void cmd_decipher(struct t1 *wc, volatile unsigned char *readchunk static inline int t1_setreg_full(struct t1 *wc, int addr, int val, int inisr, int vpm_num) { - unsigned long flags; + unsigned long flags = 0; int hit; int ret; @@ -228,8 +228,8 @@ static inline int t1_setreg_full(struct t1 *wc, int addr, int val, int inisr, in } if (inisr) break; - - spin_unlock_irqrestore(&wc->reglock, flags); + else + spin_unlock_irqrestore(&wc->reglock, flags); if (hit < 0) { if ((ret = schluffen(&wc->regq))) return ret; @@ -306,7 +306,7 @@ static inline int t1_getreg_isr(struct t1 *wc, int addr) static inline int t1_getreg_full(struct t1 *wc, int addr, int inisr, int vpm_num) { - unsigned long flags; + unsigned long flags = 0; int hit; int ret = 0; @@ -361,7 +361,7 @@ static inline int t1_getreg(struct t1 *wc, int addr, int inisr) static inline int t1_setleds(struct t1 *wc, int leds, int inisr) { - unsigned long flags; + unsigned long flags = 0; int hit; int ret = 0; diff --git a/kernel/wcte12xp/vpmadt032.c b/kernel/wcte12xp/vpmadt032.c index e989b9b..d64d959 100644 --- a/kernel/wcte12xp/vpmadt032.c +++ b/kernel/wcte12xp/vpmadt032.c @@ -1054,7 +1054,8 @@ void gpakLockAccess(unsigned short DspId) struct vpm150m *vpm = wc->vpm150m; if (vpm) - down_interruptible(&vpm->sem); + if (down_interruptible(&vpm->sem)) + return; } } -- cgit v1.2.3