summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/rfcomm
diff options
context:
space:
mode:
authorDavid Herrmann2013-02-24 19:36:51 +0100
committerGustavo Padovan2013-03-08 14:38:44 +0100
commit5e9d7f868f04106139a58212b860dcdc268ad3af (patch)
treeb18a22bb524431c882d39e425297fc0c9adf8b86 /net/bluetooth/rfcomm
parentBluetooth: Make hidp_get_raw_report abort if the session is terminating (diff)
downloadkernel-qcow2-linux-5e9d7f868f04106139a58212b860dcdc268ad3af.tar.gz
kernel-qcow2-linux-5e9d7f868f04106139a58212b860dcdc268ad3af.tar.xz
kernel-qcow2-linux-5e9d7f868f04106139a58212b860dcdc268ad3af.zip
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>
Diffstat (limited to 'net/bluetooth/rfcomm')
-rw-r--r--net/bluetooth/rfcomm/sock.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/bluetooth/rfcomm/sock.c b/net/bluetooth/rfcomm/sock.c
index c23bae86263b..3786ddc45152 100644
--- a/net/bluetooth/rfcomm/sock.c
+++ b/net/bluetooth/rfcomm/sock.c
@@ -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);
}