diff options
author | Jesper Juhl <jesper.juhl@gmail.com> | 2005-09-10 11:26:54 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-10 21:06:30 +0400 |
commit | f9101210e7aa72daf92722d451a2f7e3af5f781f (patch) | |
tree | 9554007e19387f2d05352ab03332be50c5b95f5b /drivers/media/video/stradis.c | |
parent | 887c27f369abc458556a5ce8ab22ddd498474307 (diff) | |
download | linux-f9101210e7aa72daf92722d451a2f7e3af5f781f.tar.xz |
[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) vfree(saa->vidbuf); vfree(saa->audbuf); vfree(saa->osdbuf); - if (saa->dmavid2) - kfree((void *) saa->dmavid2); + kfree(saa->dmavid2); saa->audbuf = saa->vidbuf = saa->osdbuf = NULL; saa->dmavid2 = NULL; - if (saa->dmadebi) - kfree((void *) saa->dmadebi); - if (saa->dmavid1) - kfree((void *) saa->dmavid1); - if (saa->dmavid2) - kfree((void *) saa->dmavid2); - if (saa->dmavid3) - kfree((void *) saa->dmavid3); - if (saa->dmaa1in) - kfree((void *) saa->dmaa1in); - if (saa->dmaa1out) - kfree((void *) saa->dmaa1out); - if (saa->dmaa2in) - kfree((void *) saa->dmaa2in); - if (saa->dmaa2out) - kfree((void *) saa->dmaa2out); - if (saa->dmaRPS1) - kfree((void *) saa->dmaRPS1); - if (saa->dmaRPS2) - kfree((void *) saa->dmaRPS2); + kfree(saa->dmadebi); + kfree(saa->dmavid1); + kfree(saa->dmavid3); + kfree(saa->dmaa1in); + kfree(saa->dmaa1out); + kfree(saa->dmaa2in); + kfree(saa->dmaa2out); + kfree(saa->dmaRPS1); + kfree(saa->dmaRPS2); free_irq(saa->irq, saa); if (saa->saa7146_mem) iounmap(saa->saa7146_mem); |