diff options
author | Jesper Juhl <jesper.juhl@gmail.com> | 2007-08-23 20:28:42 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-08-24 00:39:41 -0400 |
commit | abcb1ff326bfe74f3611d7de653276540ea060dd (patch) | |
tree | 20a4dbbb18b30153863654d94ea833ca39bfd8d4 /drivers/char/tty_io.c | |
parent | 87bd1e9aaf067050bd88b3219b1582e8f67f7b87 (diff) |
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/char/tty_io.c')
-rw-r--r-- | drivers/char/tty_io.c | 6 |
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, | |||
2063 | } | 2063 | } |
2064 | 2064 | ||
2065 | if (!*tp_loc) { | 2065 | if (!*tp_loc) { |
2066 | tp = (struct ktermios *) kmalloc(sizeof(struct ktermios), | 2066 | tp = kmalloc(sizeof(struct ktermios), GFP_KERNEL); |
2067 | GFP_KERNEL); | ||
2068 | if (!tp) | 2067 | if (!tp) |
2069 | goto free_mem_out; | 2068 | goto free_mem_out; |
2070 | *tp = driver->init_termios; | 2069 | *tp = driver->init_termios; |
@@ -2094,8 +2093,7 @@ static int init_dev(struct tty_driver *driver, int idx, | |||
2094 | } | 2093 | } |
2095 | 2094 | ||
2096 | if (!*o_tp_loc) { | 2095 | if (!*o_tp_loc) { |
2097 | o_tp = (struct ktermios *) | 2096 | o_tp = kmalloc(sizeof(struct ktermios), GFP_KERNEL); |
2098 | kmalloc(sizeof(struct ktermios), GFP_KERNEL); | ||
2099 | if (!o_tp) | 2097 | if (!o_tp) |
2100 | goto free_mem_out; | 2098 | goto free_mem_out; |
2101 | *o_tp = driver->other->init_termios; | 2099 | *o_tp = driver->other->init_termios; |