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)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Thu, 14 Nov 2024 20:27:47 +0000 (15:27 -0500)
commitd96b543c6f3b78b6440b68b5a5bbface553eff28
tree653450c8c8d4eddd50d48ae5b821912de981cbe6
parent8c52d2f8dc98e6acac253dbf69a690c7026fb0a6
Bluetooth: hci_conn: Reduce hci_conn_drop() calls in two functions

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>
net/bluetooth/hci_conn.c