aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/mgmt.c
diff options
context:
space:
mode:
authorAlfonso Acosta <fons@spotify.com>2014-10-07 04:44:12 -0400
committerMarcel Holtmann <marcel@holtmann.org>2014-10-25 01:56:24 -0400
commitddbea5cff7d5e2a9727f72c948e92b676a061fc5 (patch)
treea6903735c157564c28df06e02fd276b9ce680a8a /net/bluetooth/mgmt.c
parentfd45ada9105635a69cbaa2d142d502d402eef6fe (diff)
Bluetooth: Remove redundant check on hci_conn's device class
NULL-checking conn->dev_class is pointless since the variable is defined as an array, i.e. it will always be non-NULL. Signed-off-by: Alfonso Acosta <fons@spotify.com> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net/bluetooth/mgmt.c')
-rw-r--r--net/bluetooth/mgmt.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 10caab587cca..3fd88b06ed5a 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -6196,8 +6196,7 @@ void mgmt_device_connected(struct hci_dev *hdev, struct hci_conn *conn,
6196 eir_len = eir_append_data(ev->eir, 0, EIR_NAME_COMPLETE, 6196 eir_len = eir_append_data(ev->eir, 0, EIR_NAME_COMPLETE,
6197 name, name_len); 6197 name, name_len);
6198 6198
6199 if (conn->dev_class && 6199 if (memcmp(conn->dev_class, "\0\0\0", 3) != 0)
6200 memcmp(conn->dev_class, "\0\0\0", 3) != 0)
6201 eir_len = eir_append_data(ev->eir, eir_len, 6200 eir_len = eir_append_data(ev->eir, eir_len,
6202 EIR_CLASS_OF_DEV, 6201 EIR_CLASS_OF_DEV,
6203 conn->dev_class, 3); 6202 conn->dev_class, 3);