summaryrefslogtreecommitdiffstats
path: root/drivers/char/stallion.c
diff options
context:
space:
mode:
authorJesper Juhl2005-11-07 10:01:29 +0100
committerLinus Torvalds2005-11-07 16:54:02 +0100
commit735d5661d5c5f023a78fbe68e771e261040ff1b7 (patch)
treeb9865f0322d8e74661639f5f33b1897b23004659 /drivers/char/stallion.c
parent[PATCH] kfree cleanup: drivers/mtd (diff)
downloadkernel-qcow2-linux-735d5661d5c5f023a78fbe68e771e261040ff1b7.tar.gz
kernel-qcow2-linux-735d5661d5c5f023a78fbe68e771e261040ff1b7.tar.xz
kernel-qcow2-linux-735d5661d5c5f023a78fbe68e771e261040ff1b7.zip
[PATCH] kfree cleanup: drivers/char
This is the drivers/char/ part of the big kfree cleanup patch. Remove pointless checks for NULL prior to calling kfree() in drivers/char/. 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/char/stallion.c')
-rw-r--r--drivers/char/stallion.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/char/stallion.c b/drivers/char/stallion.c
index 1c686414e0a1..95af2a941595 100644
--- a/drivers/char/stallion.c
+++ b/drivers/char/stallion.c
@@ -785,8 +785,7 @@ static void __exit stallion_module_exit(void)
"errno=%d\n", -i);
class_destroy(stallion_class);
- if (stl_tmpwritebuf != (char *) NULL)
- kfree(stl_tmpwritebuf);
+ kfree(stl_tmpwritebuf);
for (i = 0; (i < stl_nrbrds); i++) {
if ((brdp = stl_brds[i]) == (stlbrd_t *) NULL)
@@ -804,8 +803,7 @@ static void __exit stallion_module_exit(void)
continue;
if (portp->tty != (struct tty_struct *) NULL)
stl_hangup(portp->tty);
- if (portp->tx.buf != (char *) NULL)
- kfree(portp->tx.buf);
+ kfree(portp->tx.buf);
kfree(portp);
}
kfree(panelp);