Skip to content

Commit

Permalink
Bluetooth: Fix incorrect status handling in LE PHY UPDATE event
Browse files Browse the repository at this point in the history
[ Upstream commit 87df8bc ]

Skip updation of tx and rx PHYs values, when PHY Update
event's status is not successful.

Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
ayushgarg-samsung authored and gregkh committed May 19, 2021
1 parent 879a96d commit 18df2bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/bluetooth/hci_event.c
Expand Up @@ -5897,7 +5897,7 @@ static void hci_le_phy_update_evt(struct hci_dev *hdev, struct sk_buff *skb)

BT_DBG("%s status 0x%2.2x", hdev->name, ev->status);

if (!ev->status)
if (ev->status)
return;

hci_dev_lock(hdev);
Expand Down

0 comments on commit 18df2bc

Please sign in to comment.