aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/zoran_card.c
diff options
context:
space:
mode:
authorJesper Juhl <jesper.juhl@gmail.com>2005-11-07 04:01:31 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-07 10:54:04 -0500
commit2ea7533060e361810c21b2f5ee02151c4dfb85d8 (patch)
tree9d8a5375c716879142dff583dfa6abddd79fefcc /drivers/media/video/zoran_card.c
parent17fd682e544556a2a829e94383239c029bb21c5e (diff)
[PATCH] kfree cleanup: drivers/media
This is the drivers/media/ part of the big kfree cleanup patch. Remove pointless checks for NULL prior to calling kfree() in drivers/media/. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Cc: Johannes Stezenbach <js@linuxtv.org> Cc: Michael Krufky <mkrufky@m1k.net> Cc: Mauro Carvalho Chehab <mchehab@brturbo.com.br> Acked-by : Manu Abraham <manu@linuxtv.org> Acked-by: Andreas Oberritter <obi@linuxtv.org> Acked-by: Wilson Michaels <wilsonmichaels@earthlink.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/media/video/zoran_card.c')
-rw-r--r--drivers/media/video/zoran_card.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/media/video/zoran_card.c b/drivers/media/video/zoran_card.c
index eed2acea1779..39a0d238900e 100644
--- a/drivers/media/video/zoran_card.c
+++ b/drivers/media/video/zoran_card.c
@@ -1057,10 +1057,8 @@ zr36057_init (struct zoran *zr)
1057 KERN_ERR 1057 KERN_ERR
1058 "%s: zr36057_init() - kmalloc (STAT_COM) failed\n", 1058 "%s: zr36057_init() - kmalloc (STAT_COM) failed\n",
1059 ZR_DEVNAME(zr)); 1059 ZR_DEVNAME(zr));
1060 if (vdev) 1060 kfree(vdev);
1061 kfree(vdev); 1061 kfree((void *)mem);
1062 if (mem)
1063 kfree((void *)mem);
1064 return -ENOMEM; 1062 return -ENOMEM;
1065 } 1063 }
1066 memset((void *) mem, 0, mem_needed); 1064 memset((void *) mem, 0, mem_needed);
@@ -1105,15 +1103,15 @@ zoran_release (struct zoran *zr)
1105 /* unregister videocodec bus */ 1103 /* unregister videocodec bus */
1106 if (zr->codec) { 1104 if (zr->codec) {
1107 struct videocodec_master *master = zr->codec->master_data; 1105 struct videocodec_master *master = zr->codec->master_data;
1106
1108 videocodec_detach(zr->codec); 1107 videocodec_detach(zr->codec);
1109 if (master) 1108 kfree(master);
1110 kfree(master);
1111 } 1109 }
1112 if (zr->vfe) { 1110 if (zr->vfe) {
1113 struct videocodec_master *master = zr->vfe->master_data; 1111 struct videocodec_master *master = zr->vfe->master_data;
1112
1114 videocodec_detach(zr->vfe); 1113 videocodec_detach(zr->vfe);
1115 if (master) 1114 kfree(master);
1116 kfree(master);
1117 } 1115 }
1118 1116
1119 /* unregister i2c bus */ 1117 /* unregister i2c bus */