summaryrefslogtreecommitdiffstats
path: root/drivers/ieee1394/video1394.c
diff options
context:
space:
mode:
authorJody McIntyre <scjody@steamballoon.com>2005-05-17 06:54:01 +0200
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-17 16:59:23 +0200
commit616b859fbd0e59707a24612d5b5fec791156c822 (patch)
tree2c58dbdfc262006886ac25a8d56c973b4f6a6772 /drivers/ieee1394/video1394.c
parent[PATCH] ieee1394: drivers/ieee1394/ieee1394_transactions.c: possible cleanups (diff)
downloadlinux-616b859fbd0e59707a24612d5b5fec791156c822.tar.xz
linux-616b859fbd0e59707a24612d5b5fec791156c822.zip
[PATCH] ieee1394: remove NULL checks for kfree
This patch removes redundant NULL pointer checks before kfree() in all of drivers/ieee1394/ Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk> Signed-off-by: Jody McIntyre <scjody@steamballoon.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/ieee1394/video1394.c')
-rw-r--r--drivers/ieee1394/video1394.c29
1 files changed, 8 insertions, 21 deletions
diff --git a/drivers/ieee1394/video1394.c b/drivers/ieee1394/video1394.c
index 4bedf7113f40..6eb9b80b1bce 100644
--- a/drivers/ieee1394/video1394.c
+++ b/drivers/ieee1394/video1394.c
@@ -180,23 +180,13 @@ static int free_dma_iso_ctx(struct dma_iso_ctx *d)
kfree(d->prg_reg);
}
- if (d->ir_prg)
- kfree(d->ir_prg);
-
- if (d->it_prg)
- kfree(d->it_prg);
-
- if (d->buffer_status)
- kfree(d->buffer_status);
- if (d->buffer_time)
- kfree(d->buffer_time);
- if (d->last_used_cmd)
- kfree(d->last_used_cmd);
- if (d->next_buffer)
- kfree(d->next_buffer);
-
+ kfree(d->ir_prg);
+ kfree(d->it_prg);
+ kfree(d->buffer_status);
+ kfree(d->buffer_time);
+ kfree(d->last_used_cmd);
+ kfree(d->next_buffer);
list_del(&d->link);
-
kfree(d);
return 0;
@@ -1060,8 +1050,7 @@ static int __video1394_ioctl(struct file *file,
PRINT(KERN_ERR, ohci->host->id,
"Buffer %d is already used",v.buffer);
spin_unlock_irqrestore(&d->lock,flags);
- if (psizes)
- kfree(psizes);
+ kfree(psizes);
return -EBUSY;
}
@@ -1116,9 +1105,7 @@ static int __video1394_ioctl(struct file *file,
}
}
- if (psizes)
- kfree(psizes);
-
+ kfree(psizes);
return 0;
}