Skip to content

Commit 5e2c59e

Browse files
sjancholtmann
authored andcommitted
Bluetooth: Remove unused parameter from tlv_data_is_valid function
hdev parameter is not used in function. Signed-off-by: Szymon Janc <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
1 parent c4960ec commit 5e2c59e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

net/bluetooth/mgmt.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6005,8 +6005,7 @@ static int read_adv_features(struct sock *sk, struct hci_dev *hdev,
60056005
return err;
60066006
}
60076007

6008-
static bool tlv_data_is_valid(struct hci_dev *hdev, u32 adv_flags, u8 *data,
6009-
u8 len, bool is_adv_data)
6008+
static bool tlv_data_is_valid(u32 adv_flags, u8 *data, u8 len, bool is_adv_data)
60106009
{
60116010
u8 max_len = HCI_MAX_AD_LENGTH;
60126011
int i, cur_len;
@@ -6168,8 +6167,8 @@ static int add_advertising(struct sock *sk, struct hci_dev *hdev,
61686167
goto unlock;
61696168
}
61706169

6171-
if (!tlv_data_is_valid(hdev, flags, cp->data, cp->adv_data_len, true) ||
6172-
!tlv_data_is_valid(hdev, flags, cp->data + cp->adv_data_len,
6170+
if (!tlv_data_is_valid(flags, cp->data, cp->adv_data_len, true) ||
6171+
!tlv_data_is_valid(flags, cp->data + cp->adv_data_len,
61736172
cp->scan_rsp_len, false)) {
61746173
err = mgmt_cmd_status(sk, hdev->id, MGMT_OP_ADD_ADVERTISING,
61756174
MGMT_STATUS_INVALID_PARAMS);

0 commit comments

Comments
 (0)