aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/net/bluetooth
diff options
context:
space:
mode:
authorRoman Smirnov <r.smirnov@omp.ru>2024-03-01 13:39:16 +0000
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2024-03-06 17:27:13 -0500
commita310d74dce686a6ed77155b5a5e67f0e7b3619fd (patch)
tree86e160e2d175a3293565b8f44e31983bd039587a /net/bluetooth
parentBluetooth: mgmt: remove NULL check in mgmt_set_connectable_complete() (diff)
downloadwireguard-linux-a310d74dce686a6ed77155b5a5e67f0e7b3619fd.tar.xz
wireguard-linux-a310d74dce686a6ed77155b5a5e67f0e7b3619fd.zip
Bluetooth: mgmt: remove NULL check in add_ext_adv_params_complete()
Remove the cmd pointer NULL check in add_ext_adv_params_complete() because it occurs earlier in add_ext_adv_params(). This check is also unnecessary because the pointer is dereferenced just before it. Found by Linux Verification Center (linuxtesting.org) with Svace. Signed-off-by: Roman Smirnov <r.smirnov@omp.ru> Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Diffstat (limited to 'net/bluetooth')
-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 8f16287930dc..9613cc8a60f8 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -8767,8 +8767,7 @@ static void add_ext_adv_params_complete(struct hci_dev *hdev, void *data,
}
unlock:
- if (cmd)
- mgmt_pending_free(cmd);
+ mgmt_pending_free(cmd);
hci_dev_unlock(hdev);
}