diff options
Diffstat (limited to 'net/bluetooth/bnep')
-rw-r--r-- | net/bluetooth/bnep/core.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/bluetooth/bnep/core.c b/net/bluetooth/bnep/core.c index 2312d050eeed..4d3424c2421c 100644 --- a/net/bluetooth/bnep/core.c +++ b/net/bluetooth/bnep/core.c | |||
@@ -528,12 +528,10 @@ static struct device *bnep_get_device(struct bnep_session *session) | |||
528 | return NULL; | 528 | return NULL; |
529 | 529 | ||
530 | conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, dst); | 530 | conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, dst); |
531 | if (!conn) | ||
532 | return NULL; | ||
533 | 531 | ||
534 | hci_dev_put(hdev); | 532 | hci_dev_put(hdev); |
535 | 533 | ||
536 | return &conn->dev; | 534 | return conn ? &conn->dev : NULL; |
537 | } | 535 | } |
538 | 536 | ||
539 | int bnep_add_connection(struct bnep_connadd_req *req, struct socket *sock) | 537 | int bnep_add_connection(struct bnep_connadd_req *req, struct socket *sock) |