[Bluetooth] Remaining transitions to use kzalloc()

This patch makes the remaining transitions to use kzalloc().

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
Marcel Holtmann 2006-07-06 15:40:09 +02:00 committed by David S. Miller
parent c2ce920468
commit 25ea6db04a
7 changed files with 16 additions and 25 deletions

View file

@ -336,9 +336,8 @@ void hci_inquiry_cache_update(struct hci_dev *hdev, struct inquiry_data *data)
if (!(e = hci_inquiry_cache_lookup(hdev, &data->bdaddr))) {
/* Entry not in the cache. Add new one. */
if (!(e = kmalloc(sizeof(struct inquiry_entry), GFP_ATOMIC)))
if (!(e = kzalloc(sizeof(struct inquiry_entry), GFP_ATOMIC)))
return;
memset(e, 0, sizeof(struct inquiry_entry));
e->next = cache->list;
cache->list = e;
}
@ -800,12 +799,10 @@ struct hci_dev *hci_alloc_dev(void)
{
struct hci_dev *hdev;
hdev = kmalloc(sizeof(struct hci_dev), GFP_KERNEL);
hdev = kzalloc(sizeof(struct hci_dev), GFP_KERNEL);
if (!hdev)
return NULL;
memset(hdev, 0, sizeof(struct hci_dev));
skb_queue_head_init(&hdev->driver_init);
return hdev;