diff options
author | Jesper Juhl <jesper.juhl@gmail.com> | 2005-09-10 03:26:54 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-10 13:06:30 -0400 |
commit | f9101210e7aa72daf92722d451a2f7e3af5f781f (patch) | |
tree | 9554007e19387f2d05352ab03332be50c5b95f5b /drivers/media/video/stradis.c | |
parent | 887c27f369abc458556a5ce8ab22ddd498474307 (diff) |
[PATCH] vfree and kfree cleanup in drivers/
This patch does a full cleanup of 'NULL checks before vfree', and a partial
cleanup of calls to kfree for all of drivers/ - the kfree bit is partial in
that I only did the files that also had vfree calls in them. The patch
also gets rid of some redundant (void *) casts of pointers being passed to
[vk]free, and a some tiny whitespace corrections also crept in.
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/media/video/stradis.c')
-rw-r--r-- | drivers/media/video/stradis.c | 32 |
1 files changed, 10 insertions, 22 deletions
diff --git a/drivers/media/video/stradis.c b/drivers/media/video/stradis.c index b57743571087..d4497dbae05c 100644 --- a/drivers/media/video/stradis.c +++ b/drivers/media/video/stradis.c | |||
@@ -2184,30 +2184,18 @@ static void release_saa(void) | |||
2184 | vfree(saa->vidbuf); | 2184 | vfree(saa->vidbuf); |
2185 | vfree(saa->audbuf); | 2185 | vfree(saa->audbuf); |
2186 | vfree(saa->osdbuf); | 2186 | vfree(saa->osdbuf); |
2187 | if (saa->dmavid2) | 2187 | kfree(saa->dmavid2); |
2188 | kfree((void *) saa->dmavid2); | ||
2189 | saa->audbuf = saa->vidbuf = saa->osdbuf = NULL; | 2188 | saa->audbuf = saa->vidbuf = saa->osdbuf = NULL; |
2190 | saa->dmavid2 = NULL; | 2189 | saa->dmavid2 = NULL; |
2191 | if (saa->dmadebi) | 2190 | kfree(saa->dmadebi); |
2192 | kfree((void *) saa->dmadebi); | 2191 | kfree(saa->dmavid1); |
2193 | if (saa->dmavid1) | 2192 | kfree(saa->dmavid3); |
2194 | kfree((void *) saa->dmavid1); | 2193 | kfree(saa->dmaa1in); |
2195 | if (saa->dmavid2) | 2194 | kfree(saa->dmaa1out); |
2196 | kfree((void *) saa->dmavid2); | 2195 | kfree(saa->dmaa2in); |
2197 | if (saa->dmavid3) | 2196 | kfree(saa->dmaa2out); |
2198 | kfree((void *) saa->dmavid3); | 2197 | kfree(saa->dmaRPS1); |
2199 | if (saa->dmaa1in) | 2198 | kfree(saa->dmaRPS2); |
2200 | kfree((void *) saa->dmaa1in); | ||
2201 | if (saa->dmaa1out) | ||
2202 | kfree((void *) saa->dmaa1out); | ||
2203 | if (saa->dmaa2in) | ||
2204 | kfree((void *) saa->dmaa2in); | ||
2205 | if (saa->dmaa2out) | ||
2206 | kfree((void *) saa->dmaa2out); | ||
2207 | if (saa->dmaRPS1) | ||
2208 | kfree((void *) saa->dmaRPS1); | ||
2209 | if (saa->dmaRPS2) | ||
2210 | kfree((void *) saa->dmaRPS2); | ||
2211 | free_irq(saa->irq, saa); | 2199 | free_irq(saa->irq, saa); |
2212 | if (saa->saa7146_mem) | 2200 | if (saa->saa7146_mem) |
2213 | iounmap(saa->saa7146_mem); | 2201 | iounmap(saa->saa7146_mem); |