diff options
Diffstat (limited to 'drivers/media/video/zoran_card.c')
-rw-r--r-- | drivers/media/video/zoran_card.c | 14 |
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 */ |