Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b60769e2 authored by Dmitry Lebed's avatar Dmitry Lebed Committed by Kalle Valo
Browse files

qtnfmac: fix firmware command error path



Free command skb if bus state is not QTNF_FW_STATE_ACTIVE.

Signed-off-by: default avatarDmitry Lebed <dlebed@quantenna.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 9e33e7fb
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -102,6 +102,7 @@ static int qtnf_cmd_send_with_reply(struct qtnf_bus *bus,
		pr_warn("VIF%u.%u: drop cmd 0x%.4X in fw state %d\n",
			mac_id, vif_id, le16_to_cpu(cmd->cmd_id),
			bus->fw_state);
		dev_kfree_skb(cmd_skb);
		return -ENODEV;
	}

+3 −1
Original line number Diff line number Diff line
@@ -35,8 +35,10 @@ int qtnf_trans_send_cmd_with_resp(struct qtnf_bus *bus, struct sk_buff *cmd_skb,
	bool resp_not_handled = true;
	struct sk_buff *resp_skb = NULL;

	if (unlikely(!response_skb))
	if (unlikely(!response_skb)) {
		dev_kfree_skb(cmd_skb);
		return -EFAULT;
	}

	spin_lock(&ctl_node->resp_lock);
	ctl_node->seq_num++;