diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2024-02-23 12:36:23 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-04-13 12:50:17 +0200 |
commit | 81a3ce3efd82e0790a6151c3dad6c02570d48816 (patch) | |
tree | 840ad2e35539941c03b7aaac8bc6e9b4acbd88b3 | |
parent | f18681daaec9665a15c5e7e0f591aad5d0ac622b (diff) | |
download | linux-stable-81a3ce3efd82e0790a6151c3dad6c02570d48816.tar.gz linux-stable-81a3ce3efd82e0790a6151c3dad6c02570d48816.tar.bz2 linux-stable-81a3ce3efd82e0790a6151c3dad6c02570d48816.zip |
Bluetooth: btintel: Fixe build regression
commit 6e62ebfb49eb65bdcbfc5797db55e0ce7f79c3dd upstream.
This fixes the following build regression:
drivers-bluetooth-btintel.c-btintel_read_version()-warn:
passing-zero-to-PTR_ERR
Fixes: b79e04091010 ("Bluetooth: btintel: Fix null ptr deref in btintel_read_version")
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/bluetooth/btintel.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c index 6a3c0ad9f10c..360daa3f8059 100644 --- a/drivers/bluetooth/btintel.c +++ b/drivers/bluetooth/btintel.c @@ -355,13 +355,13 @@ int btintel_read_version(struct hci_dev *hdev, struct intel_version *ver) struct sk_buff *skb; skb = __hci_cmd_sync(hdev, 0xfc05, 0, NULL, HCI_CMD_TIMEOUT); - if (IS_ERR_OR_NULL(skb)) { + if (IS_ERR(skb)) { bt_dev_err(hdev, "Reading Intel version information failed (%ld)", PTR_ERR(skb)); return PTR_ERR(skb); } - if (skb->len != sizeof(*ver)) { + if (!skb || skb->len != sizeof(*ver)) { bt_dev_err(hdev, "Intel version event size mismatch"); kfree_skb(skb); return -EILSEQ; |