Make sure the port private data, which contains the write sequence
number, is cleared at allocation.

Signed-off-by: Johan Hovold <jhov...@gmail.com>
---
 drivers/usb/serial/omninet.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/serial/omninet.c b/drivers/usb/serial/omninet.c
index 1e1cafe..ea1105c 100644
--- a/drivers/usb/serial/omninet.c
+++ b/drivers/usb/serial/omninet.c
@@ -112,7 +112,7 @@ static int omninet_port_probe(struct usb_serial_port *port)
 {
        struct omninet_data *od;
 
-       od = kmalloc(sizeof(struct omninet_data), GFP_KERNEL);
+       od = kzalloc(sizeof(*od), GFP_KERNEL);
        if (!od)
                return -ENOMEM;
 
-- 
1.8.1.5

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to