diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 1ace311cdea9..94f38f669932 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -2647,7 +2647,8 @@ int hci_register_dev(struct hci_dev *hdev) hci_sock_dev_event(hdev, HCI_DEV_REG); hci_dev_hold(hdev); - if (hci_register_suspend_notifier(hdev)) + error = hci_register_suspend_notifier(hdev); + if (error) goto err_wqueue; queue_work(hdev->req_workqueue, &hdev->power_on);