diff options
Diffstat (limited to 'net/bluetooth/hidp')
-rw-r--r-- | net/bluetooth/hidp/core.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c index b2d6da67d885..9a562cf7406b 100644 --- a/net/bluetooth/hidp/core.c +++ b/net/bluetooth/hidp/core.c | |||
@@ -541,12 +541,10 @@ static struct device *hidp_get_device(struct hidp_session *session) | |||
541 | return NULL; | 541 | return NULL; |
542 | 542 | ||
543 | conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, dst); | 543 | conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, dst); |
544 | if (!conn) | ||
545 | return NULL; | ||
546 | 544 | ||
547 | hci_dev_put(hdev); | 545 | hci_dev_put(hdev); |
548 | 546 | ||
549 | return &conn->dev; | 547 | return conn ? &conn->dev : NULL; |
550 | } | 548 | } |
551 | 549 | ||
552 | static inline void hidp_setup_input(struct hidp_session *session, struct hidp_connadd_req *req) | 550 | static inline void hidp_setup_input(struct hidp_session *session, struct hidp_connadd_req *req) |