]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: hci_sync: fix undefined return of hci_disconnect_all_sync()
authorTom Rix <trix@redhat.com>
Tue, 1 Feb 2022 17:42:56 +0000 (09:42 -0800)
committerMarcel Holtmann <marcel@holtmann.org>
Fri, 4 Mar 2022 15:10:49 +0000 (16:10 +0100)
commit4ee14e6f05ded1f903b2ede2f621716ebc0e1c5b
tree025a4a640cbdce10b65571a7ce57a0272bf6f028
parent67e294357ffe5e9f589d6755155d153d13669158
Bluetooth: hci_sync: fix undefined return of hci_disconnect_all_sync()

clang static analysis reports this problem
hci_sync.c:4428:2: warning: Undefined or garbage value
  returned to caller
        return err;
        ^~~~~~~~~~

If there are no connections this function is a noop but
err is never set and a false error could be reported.
Return 0 as other hci_* functions do.

Fixes: b7ac669c9a6b ("Bluetooth: hci_sync: Rework hci_suspend_notifier")
Signed-off-by: Tom Rix <trix@redhat.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
net/bluetooth/hci_sync.c