Bluetooth: MGMT: Fix misplaced BT_HS check
authorGuillaume Bertholon <guillaume.bertholon@ens.fr>
Tue, 1 Feb 2022 14:24:50 +0000 (15:24 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Feb 2022 08:27:53 +0000 (09:27 +0100)
commitbfd9dcb36526a86a3b00c3e0d72dcb306de970b2
tree97cf69f95744e752cba06c86073cac9e36fecbeb
parent07cf4e8ddac7203a9c8dfcf7cf978a9d95ce1112
Bluetooth: MGMT: Fix misplaced BT_HS check

The upstream commit b560a208cda0 ("Bluetooth: MGMT: Fix not checking if
BT_HS is enabled") inserted a new check in the `set_hs` function.
However, its backported version in stable (commit 5abe9f99f512
("Bluetooth: MGMT: Fix not checking if BT_HS is enabled")),
added the check in `set_link_security` instead.

This patch restores the intent of the upstream commit by moving back the
BT_HS check to `set_hs`.

Fixes: 5abe9f99f512 ("Bluetooth: MGMT: Fix not checking if BT_HS is enabled")
Signed-off-by: Guillaume Bertholon <guillaume.bertholon@ens.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/bluetooth/mgmt.c