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

Commit 3dc6ea3f authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "soc: qcom: fix to avoid invalid memory access"

parents 606a3e1d a1e1a009
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -318,9 +318,6 @@ static void wdsp_glink_notify_state(void *handle, const void *priv,
		if (ch->free_mem) {
			kfree(ch);
			ch = NULL;
		} else {
			/* Open the glink channel again */
			queue_work(wpriv->work_queue, &ch->lcl_ch_open_wrk);
		}
	} else if (event == GLINK_REMOTE_DISCONNECTED) {
		dev_dbg(wpriv->dev, "%s: remote channel: %s disconnected remotely\n",
@@ -607,6 +604,7 @@ static void wdsp_glink_tx_buf_work(struct work_struct *work)

	mutex_lock(&tx_buf->ch->mutex);
	if (ch->channel_state == GLINK_CONNECTED) {
		mutex_unlock(&tx_buf->ch->mutex);
		ret = glink_tx(ch->handle, tx_buf,
			       cpkt->payload, cpkt->payload_size,
			       GLINK_TX_REQ_INTENT);
@@ -621,6 +619,7 @@ static void wdsp_glink_tx_buf_work(struct work_struct *work)
			kfree(tx_buf);
		}
	} else {
		mutex_unlock(&tx_buf->ch->mutex);
		dev_err(wpriv->dev, "%s: channel %s is not in connected state\n",
			__func__, ch->ch_cfg.name);
		/*
@@ -629,7 +628,6 @@ static void wdsp_glink_tx_buf_work(struct work_struct *work)
		 */
		kfree(tx_buf);
	}
	mutex_unlock(&tx_buf->ch->mutex);
}

/*