Bluetooth: qca: drop bogus edl header checks
[linux-2.6-block.git] / drivers / bluetooth / btqca.c
index 470f7129fa1890e3068fc7517d38f4e4e4e71eb6..37488936a738b60dcf3fdc1d0d6b91bcf02de892 100644 (file)
@@ -55,11 +55,6 @@ int qca_read_soc_version(struct hci_dev *hdev, struct qca_btsoc_version *ver,
        }
 
        edl = (struct edl_event_hdr *)(skb->data);
-       if (!edl) {
-               bt_dev_err(hdev, "QCA TLV with no header");
-               err = -EILSEQ;
-               goto out;
-       }
 
        if (edl->cresp != EDL_CMD_REQ_RES_EVT ||
            edl->rtype != rtype) {
@@ -121,11 +116,6 @@ static int qca_read_fw_build_info(struct hci_dev *hdev)
        }
 
        edl = (struct edl_event_hdr *)(skb->data);
-       if (!edl) {
-               bt_dev_err(hdev, "QCA read fw build info with no header");
-               err = -EILSEQ;
-               goto out;
-       }
 
        if (edl->cresp != EDL_CMD_REQ_RES_EVT ||
            edl->rtype != EDL_GET_BUILD_INFO_CMD) {
@@ -183,11 +173,6 @@ static int qca_send_patch_config_cmd(struct hci_dev *hdev)
        }
 
        edl = (struct edl_event_hdr *)(skb->data);
-       if (!edl) {
-               bt_dev_err(hdev, "QCA Patch config with no header");
-               err = -EILSEQ;
-               goto out;
-       }
 
        if (edl->cresp != EDL_PATCH_CONFIG_RES_EVT || edl->rtype != EDL_PATCH_CONFIG_CMD) {
                bt_dev_err(hdev, "QCA Wrong packet received %d %d", edl->cresp,
@@ -502,11 +487,6 @@ static int qca_tlv_send_segment(struct hci_dev *hdev, int seg_size,
        }
 
        edl = (struct edl_event_hdr *)(skb->data);
-       if (!edl) {
-               bt_dev_err(hdev, "TLV with no header");
-               err = -EILSEQ;
-               goto out;
-       }
 
        if (edl->cresp != EDL_CMD_REQ_RES_EVT || edl->rtype != rtype) {
                bt_dev_err(hdev, "QCA TLV with error stat 0x%x rtype 0x%x",