diff options
author | Eric Sesterhenn <snakebyte@gmx.de> | 2006-02-27 15:29:43 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-03-20 17:49:59 -0500 |
commit | 80b6ca48321974a6566a1c9048ba34f60420bca6 (patch) | |
tree | a350e3cf6b794081c13c89d5b1913b2c1207570d /drivers/usb/serial/garmin_gps.c | |
parent | d54a5cb6484705f7808b337917cc7598f2f971c3 (diff) |
[PATCH] USB: kzalloc() conversion for rest of drivers/usb
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
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); |