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)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Tue, 1 Feb 2022 20:20:03 +0000 (12:20 -0800)
commitad555648a10bbb90a7762c6e4779d597b5d09e08
tree55cefb1bef6ee5996b1d4f9db93718a643956fbe
parentab2d8c1ac0a353528de4f6096fadc77845b3b44c
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: 182ee45da083 ("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