From: Ayush Garg Date: Wed, 17 Mar 2021 11:22:14 +0000 (+0530) Subject: Bluetooth: Fix incorrect status handling in LE PHY UPDATE event X-Git-Tag: v5.11.22~303 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=05e6258b67efb2420076468d9d74f09b94ce838e;p=thirdparty%2Fkernel%2Fstable.git Bluetooth: Fix incorrect status handling in LE PHY UPDATE event [ Upstream commit 87df8bcccd2cede62dfb97dc3d4ca1fe66cb4f83 ] Skip updation of tx and rx PHYs values, when PHY Update event's status is not successful. Signed-off-by: Ayush Garg Signed-off-by: Marcel Holtmann Signed-off-by: Sasha Levin --- diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 7a3e42e752350..82f4973a011d9 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -5912,7 +5912,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);