[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

@ -108,17 +108,14 @@ static void sco_sock_init_timer(struct sock *sk)
static struct sco_conn *sco_conn_add(struct hci_conn *hcon, __u8 status)
{
struct hci_dev *hdev = hcon->hdev;
struct sco_conn *conn;
struct sco_conn *conn = hcon->sco_data;
if ((conn = hcon->sco_data))
if (conn || status)
return conn;
if (status)
return conn;
if (!(conn = kmalloc(sizeof(struct sco_conn), GFP_ATOMIC)))
conn = kzalloc(sizeof(struct sco_conn), GFP_ATOMIC);
if (!conn)
return NULL;
memset(conn, 0, sizeof(struct sco_conn));
spin_lock_init(&conn->lock);
@ -134,6 +131,7 @@ static struct sco_conn *sco_conn_add(struct hci_conn *hcon, __u8 status)
conn->mtu = 60;
BT_DBG("hcon %p conn %p", hcon, conn);
return conn;
}