summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xwct4xxp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/wct4xxp.c b/wct4xxp.c
index 0e36e42..d916d66 100755
--- a/wct4xxp.c
+++ b/wct4xxp.c
@@ -578,7 +578,7 @@ static void __t4_check_vpm(struct t4 *wc, unsigned int newio)
int y;
spin_lock_irqsave(&chan->lock, flags);
for (y=0;y<chan->numbufs;y++) {
- if (chan->readidx[y])
+ if ((chan->inreadbuf > -1) && (chan->readidx[y]))
memset(chan->readbuf[chan->inreadbuf], ZT_XLAW(0, chan), chan->readidx[y]);
}
spin_unlock_irqrestore(&chan->lock, flags);