]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
Bluetooth: hci_conn: Reduce hci_conn_drop() calls in two functions
authorMarkus Elfring <elfring@users.sourceforge.net>
Tue, 1 Oct 2024 07:21:25 +0000 (09:21 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2024 19:03:55 +0000 (20:03 +0100)
commitda561d5fb646097a48577745a684cab246bae836
tree3966f4c5fe2deff1d7872fa66bf859d31cb16530
parent6e72b117614ce77e543cb7e8ae3d24a330cfa722
Bluetooth: hci_conn: Reduce hci_conn_drop() calls in two functions

[ Upstream commit d96b543c6f3b78b6440b68b5a5bbface553eff28 ]

An hci_conn_drop() call was immediately used after a null pointer check
for an hci_conn_link() call in two function implementations.
Thus call such a function only once instead directly before the checks.

This issue was transformed by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/bluetooth/hci_conn.c