Skip to content
This repository was archived by the owner on Oct 31, 2024. It is now read-only.

Commit 4a9abbc

Browse files
Vudentzgregkh
authored andcommitted
Bluetooth: btintel: Fixe build regression
commit 6e62ebf upstream. This fixes the following build regression: drivers-bluetooth-btintel.c-btintel_read_version()-warn: passing-zero-to-PTR_ERR Fixes: b79e040 ("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>
1 parent 4d5ee18 commit 4a9abbc

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/bluetooth/btintel.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -435,13 +435,13 @@ int btintel_read_version(struct hci_dev *hdev, struct intel_version *ver)
435435
struct sk_buff *skb;
436436

437437
skb = __hci_cmd_sync(hdev, 0xfc05, 0, NULL, HCI_CMD_TIMEOUT);
438-
if (IS_ERR_OR_NULL(skb)) {
438+
if (IS_ERR(skb)) {
439439
bt_dev_err(hdev, "Reading Intel version information failed (%ld)",
440440
PTR_ERR(skb));
441441
return PTR_ERR(skb);
442442
}
443443

444-
if (skb->len != sizeof(*ver)) {
444+
if (!skb || skb->len != sizeof(*ver)) {
445445
bt_dev_err(hdev, "Intel version event size mismatch");
446446
kfree_skb(skb);
447447
return -EILSEQ;

0 commit comments

Comments
 (0)