Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit abcb1ff3 authored by Jesper Juhl's avatar Jesper Juhl Committed by Linus Torvalds
Browse files

tty: dont needlessly cast kmalloc() return value



kmalloc() hands us a void pointer, we don't need to cast it.

Signed-off-by: default avatarJesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 87bd1e9a
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -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;