diff options
Diffstat (limited to 'drivers/usb/gadget/zero.c')
-rw-r--r-- | drivers/usb/gadget/zero.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/gadget/zero.c b/drivers/usb/gadget/zero.c index 44d8e5e77da7..51424f66a765 100644 --- a/drivers/usb/gadget/zero.c +++ b/drivers/usb/gadget/zero.c | |||
@@ -1188,10 +1188,9 @@ autoconf_fail: | |||
1188 | 1188 | ||
1189 | 1189 | ||
1190 | /* ok, we made sense of the hardware ... */ | 1190 | /* ok, we made sense of the hardware ... */ |
1191 | dev = kmalloc (sizeof *dev, SLAB_KERNEL); | 1191 | dev = kzalloc(sizeof(*dev), SLAB_KERNEL); |
1192 | if (!dev) | 1192 | if (!dev) |
1193 | return -ENOMEM; | 1193 | return -ENOMEM; |
1194 | memset (dev, 0, sizeof *dev); | ||
1195 | spin_lock_init (&dev->lock); | 1194 | spin_lock_init (&dev->lock); |
1196 | dev->gadget = gadget; | 1195 | dev->gadget = gadget; |
1197 | set_gadget_data (gadget, dev); | 1196 | set_gadget_data (gadget, dev); |