summaryrefslogtreecommitdiff
path: root/drivers/dahdi
diff options
context:
space:
mode:
authorTzafrir Cohen <tzafrir.cohen@xorcom.com>2008-08-05 18:34:16 +0000
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>2008-08-05 18:34:16 +0000
commit5c121d3f7bc4c1772512ae18974d908614caab13 (patch)
treead00cdaf02121df645120a170720c8e08e7d8cc6 /drivers/dahdi
parentc80a01e3d762348c884e31143ea4541f38e1de11 (diff)
Fix a small regression from r4667: Please don't NULL a good pointer.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4705 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi')
-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