summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/dahdi/dahdi-base.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/dahdi/dahdi-base.c b/drivers/dahdi/dahdi-base.c
index 932e5c6..3a18631 100644
--- a/drivers/dahdi/dahdi-base.c
+++ b/drivers/dahdi/dahdi-base.c
@@ -853,9 +853,10 @@ static int dahdi_reallocbufs(struct dahdi_chan *ss, int j, int numbufs)
numbufs = DAHDI_MAX_NUM_BUFS;
/* We need to allocate our buffers now */
- if (j && !(newbuf = kcalloc(j * 2, numbufs, GFP_KERNEL)))
- return -ENOMEM;
- else
+ if (j) {
+ if(!(newbuf = kcalloc(j * 2, numbufs, GFP_KERNEL)))
+ return -ENOMEM;
+ } else
newbuf = NULL;
/* Now that we've allocated our new buffer, we can safely