You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Bluetooth: discard bt_sock_unregister() errors
After we successfully registered a socket via bt_sock_register() there is no reason to ever check the return code of bt_sock_unregister(). If bt_sock_unregister() fails, it means the socket _is_ already unregistered so we have what we want, don't we? Also, to get bt_sock_unregister() to fail, another part of the kernel has to unregister _our_ socket. This is sooo _wrong_ that it will break way earlier than when we unregister our socket. Signed-off-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
This commit is contained in:
committed by
Gustavo Padovan
parent
fd86c9becc
commit
5e9d7f868f
@@ -1065,8 +1065,7 @@ void __exit rfcomm_cleanup_sockets(void)
|
||||
|
||||
debugfs_remove(rfcomm_sock_debugfs);
|
||||
|
||||
if (bt_sock_unregister(BTPROTO_RFCOMM) < 0)
|
||||
BT_ERR("RFCOMM socket layer unregistration failed");
|
||||
bt_sock_unregister(BTPROTO_RFCOMM);
|
||||
|
||||
proto_unregister(&rfcomm_proto);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user