diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2024-02-23 20:36:23 +0300 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2024-03-07 01:26:10 +0300 |
commit | 6e62ebfb49eb65bdcbfc5797db55e0ce7f79c3dd (patch) | |
tree | 334b8530eb2e9d2a39b014fdc2f08f36a4f58b47 /drivers/bluetooth | |
parent | 56d074d26c5828773b00b2185dd7e1d08273b8e8 (diff) | |
download | linux-6e62ebfb49eb65bdcbfc5797db55e0ce7f79c3dd.tar.xz |
Bluetooth: btintel: Fixe build regression
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>
Diffstat (limited to 'drivers/bluetooth')
-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 a083c4b8621c..6ba7f5d1b837 100644 --- a/drivers/bluetooth/btintel.c +++ b/drivers/bluetooth/btintel.c @@ -435,13 +435,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; |