提交 20a831f0 编写于 作者: J Jun Miao 提交者: Marcel Holtmann

Bluetooth: btusb: Fix a unspported condition to set available debug features

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: c453b10c ("Bluetooth: btusb: Configure Intel debug feature based on available support")
Signed-off-by: NJun Miao <jun.miao@windriver.com>
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
上级 59da0b38
......@@ -2910,10 +2910,11 @@ static int btusb_setup_intel_new(struct hci_dev *hdev)
/* Read the Intel supported features and if new exception formats
* supported, need to load the additional DDC config to enable.
*/
btintel_read_debug_features(hdev, &features);
/* Set DDC mask for available debug features */
btintel_set_debug_features(hdev, &features);
err = btintel_read_debug_features(hdev, &features);
if (!err) {
/* Set DDC mask for available debug features */
btintel_set_debug_features(hdev, &features);
}
/* Read the Intel version information after loading the FW */
err = btintel_read_version(hdev, &ver);
......@@ -3006,10 +3007,11 @@ static int btusb_setup_intel_newgen(struct hci_dev *hdev)
/* Read the Intel supported features and if new exception formats
* supported, need to load the additional DDC config to enable.
*/
btintel_read_debug_features(hdev, &features);
/* Set DDC mask for available debug features */
btintel_set_debug_features(hdev, &features);
err = btintel_read_debug_features(hdev, &features);
if (!err) {
/* Set DDC mask for available debug features */
btintel_set_debug_features(hdev, &features);
}
/* Read the Intel version information after loading the FW */
err = btintel_read_version_tlv(hdev, &version);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册