projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tty: dont needlessly cast kmalloc() return value
[cascardo/linux.git]
/
drivers
/
char
/
tty_io.c
diff --git
a/drivers/char/tty_io.c
b/drivers/char/tty_io.c
index
51ea93c
..
9c867cf
100644
(file)
--- 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) {
}
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;
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) {
}
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;
if (!o_tp)
goto free_mem_out;
*o_tp = driver->other->init_termios;