mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-07 13:43:51 +00:00
Bluetooth: btintel: Fixe build regression
commit6e62ebfb49
upstream. This fixes the following build regression: drivers-bluetooth-btintel.c-btintel_read_version()-warn: passing-zero-to-PTR_ERR Fixes:b79e040910
("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>
This commit is contained in:
parent
00e34ff1ce
commit
21f5cfed1e
@ -405,13 +405,13 @@ int btintel_read_version(struct hci_dev *hdev, struct intel_version *ver)
|
|||||||
struct sk_buff *skb;
|
struct sk_buff *skb;
|
||||||
|
|
||||||
skb = __hci_cmd_sync(hdev, 0xfc05, 0, NULL, HCI_CMD_TIMEOUT);
|
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)",
|
bt_dev_err(hdev, "Reading Intel version information failed (%ld)",
|
||||||
PTR_ERR(skb));
|
PTR_ERR(skb));
|
||||||
return 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");
|
bt_dev_err(hdev, "Intel version event size mismatch");
|
||||||
kfree_skb(skb);
|
kfree_skb(skb);
|
||||||
return -EILSEQ;
|
return -EILSEQ;
|
||||||
|
Loading…
Reference in New Issue
Block a user