Commit a310d74d authored by Roman Smirnov's avatar Roman Smirnov Committed by Luiz Augusto von Dentz
Browse files

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: default avatarRoman Smirnov <r.smirnov@omp.ru>
Reviewed-by: default avatarSergey Shtylyov <s.shtylyov@omp.ru>
Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
parent 3237da12
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -8767,7 +8767,6 @@ static void add_ext_adv_params_complete(struct hci_dev *hdev, void *data,
	}

unlock:
	if (cmd)
	mgmt_pending_free(cmd);

	hci_dev_unlock(hdev);