提交 f2edd9f6 编写于 作者: S Sebastian Reichel 提交者: Marcel Holtmann

Bluetooth: hci_ll: Fix NULL pointer deref on FW upload failure

Avoid NULL pointer dereference occurring due to freeing
skb containing an error pointer. It can easily be triggered
by using the driver with broken uart (i.e. due to misconfigured
pinmuxing).

Fixes: 37180552 ("bluetooth: hci_uart: add LL protocol serdev driver support")
Signed-off-by: NSebastian Reichel <sre@kernel.org>
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
上级 fb796707
......@@ -537,8 +537,7 @@ static int read_local_version(struct hci_dev *hdev)
if (IS_ERR(skb)) {
bt_dev_err(hdev, "Reading TI version information failed (%ld)",
PTR_ERR(skb));
err = PTR_ERR(skb);
goto out;
return PTR_ERR(skb);
}
if (skb->len != sizeof(*ver)) {
err = -EILSEQ;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册