[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <4d63101a9182b9ffd3bd662d8193873f83436883.1187912217.git.jesper.juhl@gmail.com>
Date: Fri, 24 Aug 2007 02:28:42 +0200
From: Jesper Juhl <jesper.juhl@...il.com>
To: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Cc: Alan Cox <alan@...rguk.ukuu.org.uk>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Jesper Juhl <jesper.juhl@...il.com>
Subject: [PATCH 25/30] 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@...il.com>
---
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 51ea93c..9c867cf 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;
--
1.5.2.2
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists