[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
@@ -261,12 +261,10 @@ static int vhci_open(struct inode *inode, struct file *file)
|
||||
struct vhci_data *vhci;
|
||||
struct hci_dev *hdev;
|
||||
|
||||
vhci = kmalloc(sizeof(struct vhci_data), GFP_KERNEL);
|
||||
vhci = kzalloc(sizeof(struct vhci_data), GFP_KERNEL);
|
||||
if (!vhci)
|
||||
return -ENOMEM;
|
||||
|
||||
memset(vhci, 0, sizeof(struct vhci_data));
|
||||
|
||||
skb_queue_head_init(&vhci->readq);
|
||||
init_waitqueue_head(&vhci->read_wait);
|
||||
|
||||
|
Reference in New Issue
Block a user