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

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

Merge "msm: sps: avoid accessing resources released by pipe disconnect"

parents 7ef09c3a 88a25d23
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -1326,6 +1326,7 @@ int sps_connect(struct sps_pipe *h, struct sps_connect *connect)
		goto exit_err;
	}

	mutex_lock(&bam->lock);
	SPS_DBG2("sps:sps_connect: bam %pa src 0x%lx dest 0x%lx mode %s",
			BAM_ID(bam),
			connect->source,
@@ -1334,14 +1335,13 @@ int sps_connect(struct sps_pipe *h, struct sps_connect *connect)

	/* Allocate resources for the specified connection */
	pipe->connect = *connect;
	mutex_lock(&bam->lock);
	result = sps_rm_state_change(pipe, SPS_STATE_ALLOCATE);
	if (result) {
		mutex_unlock(&bam->lock);
	if (result)
		goto exit_err;
	}

	/* Configure the connection */
	mutex_lock(&bam->lock);
	result = sps_rm_state_change(pipe, SPS_STATE_CONNECT);
	mutex_unlock(&bam->lock);
	if (result) {