Commit 519e42b3 authored by Lukasz Rymanowski's avatar Lukasz Rymanowski Committed by Gustavo Padovan

Bluetooth: Remove not needed status parameter

Sco_conn_add is called from two places and always with status = 0.
Signed-off-by: default avatarLukasz Rymanowski <lukasz.rymanowski@tieto.com>
Signed-off-by: default avatarGustavo Padovan <gustavo@padovan.org>
parent 7d5d775a
...@@ -93,12 +93,12 @@ static void sco_sock_clear_timer(struct sock *sk) ...@@ -93,12 +93,12 @@ static void sco_sock_clear_timer(struct sock *sk)
} }
/* ---- SCO connections ---- */ /* ---- SCO connections ---- */
static struct sco_conn *sco_conn_add(struct hci_conn *hcon, __u8 status) static struct sco_conn *sco_conn_add(struct hci_conn *hcon)
{ {
struct hci_dev *hdev = hcon->hdev; struct hci_dev *hdev = hcon->hdev;
struct sco_conn *conn = hcon->sco_data; struct sco_conn *conn = hcon->sco_data;
if (conn || status) if (conn)
return conn; return conn;
conn = kzalloc(sizeof(struct sco_conn), GFP_ATOMIC); conn = kzalloc(sizeof(struct sco_conn), GFP_ATOMIC);
...@@ -199,7 +199,7 @@ static int sco_connect(struct sock *sk) ...@@ -199,7 +199,7 @@ static int sco_connect(struct sock *sk)
goto done; goto done;
} }
conn = sco_conn_add(hcon, 0); conn = sco_conn_add(hcon);
if (!conn) { if (!conn) {
hci_conn_put(hcon); hci_conn_put(hcon);
err = -ENOMEM; err = -ENOMEM;
...@@ -924,7 +924,7 @@ int sco_connect_cfm(struct hci_conn *hcon, __u8 status) ...@@ -924,7 +924,7 @@ int sco_connect_cfm(struct hci_conn *hcon, __u8 status)
if (!status) { if (!status) {
struct sco_conn *conn; struct sco_conn *conn;
conn = sco_conn_add(hcon, status); conn = sco_conn_add(hcon);
if (conn) if (conn)
sco_conn_ready(conn); sco_conn_ready(conn);
} else } else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment