Bluetooth: btusb: Fix a unspported condition to set available debug features
[ Upstream commit 20a831f04f1526f2c3442efd3dece8630216b5d2 ]
When reading the support debug features failed, there are not available
features init. Continue to set the debug features is illogical, we should
skip btintel_set_debug_features(), even if check it by "if (!features)".
Fixes: c453b10c2b
("Bluetooth: btusb: Configure Intel debug feature based on available support")
Signed-off-by: Jun Miao <jun.miao@windriver.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
de5f8501a4
commit
336e972af9
@ -2921,10 +2921,11 @@ static int btusb_setup_intel_new(struct hci_dev *hdev)
|
|||||||
/* Read the Intel supported features and if new exception formats
|
/* Read the Intel supported features and if new exception formats
|
||||||
* supported, need to load the additional DDC config to enable.
|
* supported, need to load the additional DDC config to enable.
|
||||||
*/
|
*/
|
||||||
btintel_read_debug_features(hdev, &features);
|
err = btintel_read_debug_features(hdev, &features);
|
||||||
|
if (!err) {
|
||||||
/* Set DDC mask for available debug features */
|
/* Set DDC mask for available debug features */
|
||||||
btintel_set_debug_features(hdev, &features);
|
btintel_set_debug_features(hdev, &features);
|
||||||
|
}
|
||||||
|
|
||||||
/* Read the Intel version information after loading the FW */
|
/* Read the Intel version information after loading the FW */
|
||||||
err = btintel_read_version(hdev, &ver);
|
err = btintel_read_version(hdev, &ver);
|
||||||
@ -3017,10 +3018,11 @@ static int btusb_setup_intel_newgen(struct hci_dev *hdev)
|
|||||||
/* Read the Intel supported features and if new exception formats
|
/* Read the Intel supported features and if new exception formats
|
||||||
* supported, need to load the additional DDC config to enable.
|
* supported, need to load the additional DDC config to enable.
|
||||||
*/
|
*/
|
||||||
btintel_read_debug_features(hdev, &features);
|
err = btintel_read_debug_features(hdev, &features);
|
||||||
|
if (!err) {
|
||||||
/* Set DDC mask for available debug features */
|
/* Set DDC mask for available debug features */
|
||||||
btintel_set_debug_features(hdev, &features);
|
btintel_set_debug_features(hdev, &features);
|
||||||
|
}
|
||||||
|
|
||||||
/* Read the Intel version information after loading the FW */
|
/* Read the Intel version information after loading the FW */
|
||||||
err = btintel_read_version_tlv(hdev, &version);
|
err = btintel_read_version_tlv(hdev, &version);
|
||||||
|
Loading…
Reference in New Issue
Block a user