From: Johan Hovold Date: Tue, 16 Apr 2013 16:01:19 +0000 (+0200) Subject: USB: omninet: use kzalloc for private data X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=81f58c67b1d71b3a1a6c2bb077844249790807c8;p=openwrt%2Fstaging%2Fblogic.git USB: omninet: use kzalloc for private data Make sure the port private data, which contains the write sequence number, is cleared at allocation. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/serial/omninet.c b/drivers/usb/serial/omninet.c index 1e1cafe287e4..ea1105c84d50 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;