diff options
author | Jesper Juhl <jesper.juhl@gmail.com> | 2005-11-07 04:01:29 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-07 10:54:02 -0500 |
commit | 735d5661d5c5f023a78fbe68e771e261040ff1b7 (patch) | |
tree | b9865f0322d8e74661639f5f33b1897b23004659 /drivers/char/stallion.c | |
parent | fa671646f61182cd18234461a6e65f50c6558695 (diff) |
[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.c | 6 |
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) | |||
785 | "errno=%d\n", -i); | 785 | "errno=%d\n", -i); |
786 | class_destroy(stallion_class); | 786 | class_destroy(stallion_class); |
787 | 787 | ||
788 | if (stl_tmpwritebuf != (char *) NULL) | 788 | kfree(stl_tmpwritebuf); |
789 | kfree(stl_tmpwritebuf); | ||
790 | 789 | ||
791 | for (i = 0; (i < stl_nrbrds); i++) { | 790 | for (i = 0; (i < stl_nrbrds); i++) { |
792 | if ((brdp = stl_brds[i]) == (stlbrd_t *) NULL) | 791 | if ((brdp = stl_brds[i]) == (stlbrd_t *) NULL) |
@@ -804,8 +803,7 @@ static void __exit stallion_module_exit(void) | |||
804 | continue; | 803 | continue; |
805 | if (portp->tty != (struct tty_struct *) NULL) | 804 | if (portp->tty != (struct tty_struct *) NULL) |
806 | stl_hangup(portp->tty); | 805 | stl_hangup(portp->tty); |
807 | if (portp->tx.buf != (char *) NULL) | 806 | kfree(portp->tx.buf); |
808 | kfree(portp->tx.buf); | ||
809 | kfree(portp); | 807 | kfree(portp); |
810 | } | 808 | } |
811 | kfree(panelp); | 809 | kfree(panelp); |