summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShaun Ruffell <sruffell@digium.com>2008-11-05 20:11:03 +0000
committerShaun Ruffell <sruffell@digium.com>2008-11-05 20:11:03 +0000
commit3711d123b0053a1ee0b16edc96bc18cbd728abb8 (patch)
tree715b0ab3ba90f1de34cbfec63250982cf62336b3
parentb15ca2e17016040cd83be0749b8c06c8e75b806a (diff)
Check the return value of the down_interruptible call in order to quiet a
warning. This semaphore does not protect any host data structures, but only accesses to the VPMADT032 module. The worse thing that could happen is that the internal state of the VPM module is corrupted, and then would only happen on module loading because otherwise access because that is the only time this function is called in the context of a user process. In this case, the module would need to be reloaded again anyway. (Closes issue #13742) Reported by smurfix git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5236 a0bf4364-ded3-4de4-8d8a-66a801d63aff
-rw-r--r--drivers/dahdi/wctdm24xxp/GpakCust.c7
-rw-r--r--drivers/dahdi/wcte12xp/vpmadt032.c4
2 files changed, 8 insertions, 3 deletions
diff --git a/drivers/dahdi/wctdm24xxp/GpakCust.c b/drivers/dahdi/wctdm24xxp/GpakCust.c
index ea77e0d..a32fb96 100644
--- a/drivers/dahdi/wctdm24xxp/GpakCust.c
+++ b/drivers/dahdi/wctdm24xxp/GpakCust.c
@@ -407,8 +407,11 @@ void gpakLockAccess(unsigned short DspId)
if (wc) {
struct vpm150m *vpm = wc->vpm150m;
- if (vpm)
- down_interruptible(&vpm->sem);
+ if (vpm) {
+ if (down_interruptible(&vpm->sem)) {
+ return;
+ }
+ }
}
}
diff --git a/drivers/dahdi/wcte12xp/vpmadt032.c b/drivers/dahdi/wcte12xp/vpmadt032.c
index 1df5415..c9df41c 100644
--- a/drivers/dahdi/wcte12xp/vpmadt032.c
+++ b/drivers/dahdi/wcte12xp/vpmadt032.c
@@ -1057,7 +1057,9 @@ void gpakLockAccess(unsigned short DspId)
struct vpm150m *vpm = wc->vpm150m;
if (vpm)
- down_interruptible(&vpm->sem);
+ if (down_interruptible(&vpm->sem)) {
+ return;
+ }
}
}