OSDN Git Service

Bluetooth: Remove unnecessary NULL check in hci_inquiry_cache_update
authorJohan Hedberg <johan.hedberg@intel.com>
Thu, 27 Mar 2014 11:51:24 +0000 (13:51 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 27 Mar 2014 16:00:58 +0000 (09:00 -0700)
The ssp parameter is supposed to be a mandatory one and there are no
callers that would pass NULL to this function. Removing this unnecessary
NULL check also makes (false positive) static analyzer warnings go away.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/hci_core.c

index c6189d9..7cf511c 100644 (file)
@@ -2032,7 +2032,7 @@ bool hci_inquiry_cache_update(struct hci_dev *hdev, struct inquiry_data *data,
 
        ie = hci_inquiry_cache_lookup(hdev, &data->bdaddr);
        if (ie) {
-               if (ie->data.ssp_mode && ssp)
+               if (ie->data.ssp_mode)
                        *ssp = true;
 
                if (ie->name_state == NAME_NEEDED &&