projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
87bd1e9
)
tty: dont needlessly cast kmalloc() return value
author
Jesper Juhl
<
[email protected]
>
Fri, 24 Aug 2007 00:28:42 +0000
(
02:28
+0200)
committer
Linus Torvalds
<
[email protected]
>
Fri, 24 Aug 2007 04:39:41 +0000
(21:39 -0700)
kmalloc() hands us a void pointer, we don't need to cast it.
Signed-off-by: Jesper Juhl <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
drivers/char/tty_io.c
patch
|
blob
|
history
diff --git
a/drivers/char/tty_io.c
b/drivers/char/tty_io.c
index 51ea93cab6c4c098cbd40dba6d17aa96e09b5c6e..9c867cf6de6456293314eb1675e697c87a9f64d2 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) {
- 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;