Skip to contentSkip to conversation

serial: clear entire struct in uart_get_info()

PATCH New Dan Carpenter 1 participant 1 message Sep 7, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 serial: clear entire struct in uart_get_info()

There is a typo here, sizeof(retinfo) should be sizeof(*retinfo) to clear the struct.

---
Only needed in linux-next.

drivers/tty/serial/serial_core.c +1 -1
index 137b25c..19993d8 100644
@@ -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;