From: Lukasz Rymanowski <lukasz.rymanowski@tieto.com>
To: <linux-bluetooth@vger.kernel.org>
Cc: Lukasz Rymanowski <lukasz.rymanowski@tieto.com>
Subject: [PATCH 1/2] Bluetooth: Remove not needed status parameter
Date: Thu, 19 Apr 2012 16:12:28 +0200 [thread overview]
Message-ID: <1334844749-13441-2-git-send-email-lukasz.rymanowski@tieto.com> (raw)
In-Reply-To: <1334844749-13441-1-git-send-email-lukasz.rymanowski@tieto.com>
Sco_conn_add is called from two places and always with status = 0.
Signed-off-by: Lukasz Rymanowski <lukasz.rymanowski@tieto.com>
---
net/bluetooth/sco.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c
index 32c0e31..d20d719 100644
--- a/net/bluetooth/sco.c
+++ b/net/bluetooth/sco.c
@@ -94,12 +94,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);
@@ -200,7 +200,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;
@@ -920,7 +920,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
--
1.7.9.4
next prev parent reply other threads:[~2012-04-19 14:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-19 14:12 [PATCH 0/2] Bluetooth: Fix crash on SCO socket shutdown Lukasz Rymanowski
2012-04-19 14:12 ` Lukasz Rymanowski [this message]
2012-04-19 15:26 ` [PATCH 1/2] Bluetooth: Remove not needed status parameter Gustavo Padovan
2012-04-19 14:12 ` [PATCH 2/2] Bluetooth: Fix crash on SCO socket shutdown Lukasz Rymanowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1334844749-13441-2-git-send-email-lukasz.rymanowski@tieto.com \
--to=lukasz.rymanowski@tieto.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox