Skip to contentSkip to conversation

bluetooth:Make the function sco_conn_del have a return type of void

PATCH In review Nicholas Krause 2 participants 2 messages Aug 19, 2015

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bluetooth:Make the function sco_conn_del have a return type of void

This makes the function sco_conn_del have a return type of void now due to this function always running successfully and thus never needing to signal its caller when a non recoverable internal failure occurs by returning a error code to its respective caller.

---
 net/bluetooth/sco.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
net/bluetooth/sco.c +2 -3
index 688a040..f315c8d 100644
@@ -154,13 +154,13 @@ static void sco_chan_del(struct sock *sk, int err)
 	sock_set_flag(sk, SOCK_ZAPPED);
 }
 
-static int sco_conn_del(struct hci_conn *hcon, int err)
+static void sco_conn_del(struct hci_conn *hcon, int err)
 {
 	struct sco_conn *conn = hcon->sco_data;
 	struct sock *sk;
 
 	if (!conn)
-		return 0;
+		return;
 
 	BT_DBG("hcon %p conn %p, err %d", hcon, conn, err);
 
@@ -179,7 +179,6 @@ static int sco_conn_del(struct hci_conn *hcon, int err)
 
 	hcon->sco_data = NULL;
 	kfree(conn);
-	return 0;
 }
 
 static void __sco_chan_add(struct sco_conn *conn, struct sock *sk, struct sock *parent)
Signature · 1 line
2.1.4
maintainer
#1 lore raw

Hi Nicholas,

Quoted 9 lines

This makes the function sco_conn_del have a return type of void now due to this function always running successfully and thus never needing to signal its caller when a non recoverable internal failure occurs by returning a error code to its respective caller.

---
net/bluetooth/sco.c | 5 ++---

1 file changed, 2 insertions(+), 3 deletions(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel