summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJesper Juhl <jesper.juhl@gmail.com>2007-08-24 02:28:42 +0200
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-08-24 06:39:41 +0200
commitabcb1ff326bfe74f3611d7de653276540ea060dd (patch)
tree20a4dbbb18b30153863654d94ea833ca39bfd8d4 /drivers
parentMerge branch 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/mch... (diff)
downloadlinux-abcb1ff326bfe74f3611d7de653276540ea060dd.tar.xz
linux-abcb1ff326bfe74f3611d7de653276540ea060dd.zip
tty: dont needlessly cast kmalloc() return value
kmalloc() hands us a void pointer, we don't need to cast it. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/tty_io.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
index 51ea93cab6c4..9c867cf6de64 100644
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -2063,8 +2063,7 @@ static int init_dev(struct tty_driver *driver, int idx,
}
if (!*tp_loc) {
- tp = (struct ktermios *) kmalloc(sizeof(struct ktermios),
- GFP_KERNEL);
+ tp = kmalloc(sizeof(struct ktermios), GFP_KERNEL);
if (!tp)
goto free_mem_out;
*tp = driver->init_termios;
@@ -2094,8 +2093,7 @@ static int init_dev(struct tty_driver *driver, int idx,
}
if (!*o_tp_loc) {
- o_tp = (struct ktermios *)
- kmalloc(sizeof(struct ktermios), GFP_KERNEL);
+ o_tp = kmalloc(sizeof(struct ktermios), GFP_KERNEL);
if (!o_tp)
goto free_mem_out;
*o_tp = driver->other->init_termios;