Bluetooth: btintel_pcie: Fix REVERSE_INULL issue reported by coverity
authorVijay Satija <vijay.satija@intel.com>
Fri, 17 May 2024 09:54:47 +0000 (15:24 +0530)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Fri, 28 Jun 2024 18:30:25 +0000 (14:30 -0400)
check pdata return of skb_pull_data, instead of data.

Fixes: c2b636b3f788 ("Bluetooth: btintel_pcie: Add support for PCIe transport")
Signed-off-by: Vijay Satija <vijay.satija@intel.com>
Signed-off-by: Kiran K <kiran.k@intel.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
drivers/bluetooth/btintel_pcie.c

index 5b6805d87fcff9b9903703f404be2bce4255fced..dd3c0626c72d85eb2866330f06a821f602a1e63f 100644 (file)
@@ -382,7 +382,7 @@ static int btintel_pcie_recv_frame(struct btintel_pcie_data *data,
 
        /* The first 4 bytes indicates the Intel PCIe specific packet type */
        pdata = skb_pull_data(skb, BTINTEL_PCIE_HCI_TYPE_LEN);
-       if (!data) {
+       if (!pdata) {
                bt_dev_err(hdev, "Corrupted packet received");
                ret = -EILSEQ;
                goto exit_error;