qtnfmac: fix firmware command error path

Free command skb if bus state is not QTNF_FW_STATE_ACTIVE.

Signed-off-by: Dmitry Lebed <dlebed@quantenna.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
Dmitry Lebed
2018-05-29 15:00:02 +03:00
committed by Kalle Valo
父節點 9e33e7fb47
當前提交 b60769e2df
共有 2 個文件被更改,包括 4 次插入1 次删除

查看文件

@@ -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++;