提交 37cd0c99 编写于 作者: F Fengguang Wu 提交者: Greg Kroah-Hartman

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: NFengguang Wu <fengguang.wu@intel.com>
Signed-off-by: NAlan Cox <alan@linux.intel.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 6721ab7f
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册