Skip to content

Commit

Permalink
serial_core: fix sizeof(pointer)
Browse files Browse the repository at this point in the history
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 <fengguang.wu@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Fengguang Wu authored and Greg Kroah-Hartman committed Sep 6, 2012
1 parent 6721ab7 commit 37cd0c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/tty/serial/serial_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 37cd0c9

Please sign in to comment.