From a03471b492bdbdcc58a91e0c574c333e0f4dce3a Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sun, 15 Oct 2006 17:31:05 +0200 Subject: [PATCH] --- yaml --- r: 39699 b: refs/heads/master c: b2cfcd75df77b80d9cc3fa84190a350dfa79eb93 h: refs/heads/master i: 39697: 72cf8f7ef78d1f2fa6a9d0766be1e37e586b8703 39695: 219f4557f7f95c65b0465cde0b35106be8925a5a v: v3 --- [refs] | 2 +- trunk/net/bluetooth/bnep/core.c | 4 +--- trunk/net/bluetooth/hidp/core.c | 4 +--- trunk/net/bluetooth/rfcomm/tty.c | 4 +--- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/[refs] b/[refs] index 1be696a13615..45a2e74fd909 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e86070c83e9110e89800274385c013db602b1444 +refs/heads/master: b2cfcd75df77b80d9cc3fa84190a350dfa79eb93 diff --git a/trunk/net/bluetooth/bnep/core.c b/trunk/net/bluetooth/bnep/core.c index 2312d050eeed..4d3424c2421c 100644 --- a/trunk/net/bluetooth/bnep/core.c +++ b/trunk/net/bluetooth/bnep/core.c @@ -528,12 +528,10 @@ static struct device *bnep_get_device(struct bnep_session *session) return NULL; conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, dst); - if (!conn) - return NULL; hci_dev_put(hdev); - return &conn->dev; + return conn ? &conn->dev : NULL; } int bnep_add_connection(struct bnep_connadd_req *req, struct socket *sock) diff --git a/trunk/net/bluetooth/hidp/core.c b/trunk/net/bluetooth/hidp/core.c index b2d6da67d885..9a562cf7406b 100644 --- a/trunk/net/bluetooth/hidp/core.c +++ b/trunk/net/bluetooth/hidp/core.c @@ -541,12 +541,10 @@ static struct device *hidp_get_device(struct hidp_session *session) return NULL; conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, dst); - if (!conn) - return NULL; hci_dev_put(hdev); - return &conn->dev; + return conn ? &conn->dev : NULL; } static inline void hidp_setup_input(struct hidp_session *session, struct hidp_connadd_req *req) diff --git a/trunk/net/bluetooth/rfcomm/tty.c b/trunk/net/bluetooth/rfcomm/tty.c index 1958ad1b8541..5833b87c51cf 100644 --- a/trunk/net/bluetooth/rfcomm/tty.c +++ b/trunk/net/bluetooth/rfcomm/tty.c @@ -172,12 +172,10 @@ static struct device *rfcomm_get_device(struct rfcomm_dev *dev) return NULL; conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &dev->dst); - if (!conn) - return NULL; hci_dev_put(hdev); - return &conn->dev; + return conn ? &conn->dev : NULL; } static int rfcomm_dev_add(struct rfcomm_dev_req *req, struct rfcomm_dlc *dlc)