Skip to content

Commit

Permalink
Bluetooth: Remove not needed status parameter
Browse files Browse the repository at this point in the history
Sco_conn_add is called from two places and always with status = 0.

Signed-off-by: Lukasz Rymanowski <lukasz.rymanowski@tieto.com>
Signed-off-by: Gustavo Padovan <gustavo@padovan.org>
  • Loading branch information
Lukasz Rymanowski authored and Gustavo Padovan committed May 9, 2012
1 parent 7d5d775 commit 519e42b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions net/bluetooth/sco.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,12 @@ static void sco_sock_clear_timer(struct sock *sk)
}

/* ---- 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 sco_conn *conn = hcon->sco_data;

if (conn || status)
if (conn)
return conn;

conn = kzalloc(sizeof(struct sco_conn), GFP_ATOMIC);
Expand Down Expand Up @@ -199,7 +199,7 @@ static int sco_connect(struct sock *sk)
goto done;
}

conn = sco_conn_add(hcon, 0);
conn = sco_conn_add(hcon);
if (!conn) {
hci_conn_put(hcon);
err = -ENOMEM;
Expand Down Expand Up @@ -924,7 +924,7 @@ int sco_connect_cfm(struct hci_conn *hcon, __u8 status)
if (!status) {
struct sco_conn *conn;

conn = sco_conn_add(hcon, status);
conn = sco_conn_add(hcon);
if (conn)
sco_conn_ready(conn);
} else
Expand Down

0 comments on commit 519e42b

Please sign in to comment.