Skip to content

Commit 6e62ebf

Browse files
committed
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: b79e040 ("Bluetooth: btintel: Fix null ptr deref in btintel_read_version") Signed-off-by: Luiz Augusto von Dentz <[email protected]>
1 parent 56d074d commit 6e62ebf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/bluetooth/btintel.c

+2-2
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)