From: Fengguang Wu Date: Thu, 6 Sep 2012 02:27:51 +0000 (+0800) Subject: serial_core: fix sizeof(pointer) X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=37cd0c994fc8ecbfb258c4be2442d9d6f31447ea;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git serial_core: fix sizeof(pointer) sizeof when applied to a pointer typed expression gives the size of the pointer. Generated by: scripts/coccinelle/misc/noderef.cocci Signed-off-by: Fengguang Wu Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c index 137b25ce39a7..19993d89db37 100644 --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c @@ -640,7 +640,7 @@ static void uart_get_info(struct tty_port *port, { struct uart_port *uport = state->uart_port; - memset(retinfo, 0, sizeof(retinfo)); + memset(retinfo, 0, sizeof(*retinfo)); retinfo->type = uport->type; retinfo->line = uport->line;