[PATCH] bluetooth: kmalloc + memset -> kzalloc conversion
Signed-off-by: Deepak Saxena <dsaxena@plexity.net> Cc: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:

committed by
Linus Torvalds

parent
f5e3c2faa2
commit
089b1dbbde
@@ -553,14 +553,12 @@ static int bpa10x_probe(struct usb_interface *intf, const struct usb_device_id *
|
||||
if (intf->cur_altsetting->desc.bInterfaceNumber > 0)
|
||||
return -ENODEV;
|
||||
|
||||
data = kmalloc(sizeof(*data), GFP_KERNEL);
|
||||
data = kzalloc(sizeof(*data), GFP_KERNEL);
|
||||
if (!data) {
|
||||
BT_ERR("Can't allocate data structure");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
memset(data, 0, sizeof(*data));
|
||||
|
||||
data->udev = udev;
|
||||
|
||||
rwlock_init(&data->lock);
|
||||
|
Reference in New Issue
Block a user