diff options
Diffstat (limited to 'drivers/usb/serial/garmin_gps.c')
-rw-r--r-- | drivers/usb/serial/garmin_gps.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/serial/garmin_gps.c b/drivers/usb/serial/garmin_gps.c index d6f55e9dccae..5ec9bf5bac8d 100644 --- a/drivers/usb/serial/garmin_gps.c +++ b/drivers/usb/serial/garmin_gps.c | |||
@@ -1422,12 +1422,11 @@ static int garmin_attach (struct usb_serial *serial) | |||
1422 | 1422 | ||
1423 | dbg("%s", __FUNCTION__); | 1423 | dbg("%s", __FUNCTION__); |
1424 | 1424 | ||
1425 | garmin_data_p = kmalloc (sizeof(struct garmin_data), GFP_KERNEL); | 1425 | garmin_data_p = kzalloc(sizeof(struct garmin_data), GFP_KERNEL); |
1426 | if (garmin_data_p == NULL) { | 1426 | if (garmin_data_p == NULL) { |
1427 | dev_err(&port->dev, "%s - Out of memory\n", __FUNCTION__); | 1427 | dev_err(&port->dev, "%s - Out of memory\n", __FUNCTION__); |
1428 | return -ENOMEM; | 1428 | return -ENOMEM; |
1429 | } | 1429 | } |
1430 | memset (garmin_data_p, 0, sizeof(struct garmin_data)); | ||
1431 | init_timer(&garmin_data_p->timer); | 1430 | init_timer(&garmin_data_p->timer); |
1432 | spin_lock_init(&garmin_data_p->lock); | 1431 | spin_lock_init(&garmin_data_p->lock); |
1433 | INIT_LIST_HEAD(&garmin_data_p->pktlist); | 1432 | INIT_LIST_HEAD(&garmin_data_p->pktlist); |