aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/bluetooth/hci_conn.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index 7ee6895c4b0c..8549d04e3313 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -551,7 +551,7 @@ struct hci_conn *hci_connect(struct hci_dev *hdev, int type, bdaddr_t *dst, __u8
551 if (!acl) { 551 if (!acl) {
552 acl = hci_conn_add(hdev, ACL_LINK, dst); 552 acl = hci_conn_add(hdev, ACL_LINK, dst);
553 if (!acl) 553 if (!acl)
554 return NULL; 554 return ERR_PTR(-ENOMEM);
555 } 555 }
556 556
557 hci_conn_hold(acl); 557 hci_conn_hold(acl);
@@ -571,7 +571,7 @@ struct hci_conn *hci_connect(struct hci_dev *hdev, int type, bdaddr_t *dst, __u8
571 sco = hci_conn_add(hdev, type, dst); 571 sco = hci_conn_add(hdev, type, dst);
572 if (!sco) { 572 if (!sco) {
573 hci_conn_put(acl); 573 hci_conn_put(acl);
574 return NULL; 574 return ERR_PTR(-ENOMEM);
575 } 575 }
576 } 576 }
577 577