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

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

Merge "ngd_slim: Fix return paths in transfer function"

parents 1f77f04f 7241199f
Loading
Loading
Loading
Loading
+11 −10
Original line number Diff line number Diff line
@@ -299,7 +299,13 @@ static int ngd_xfer_msg(struct slim_controller *ctrl, struct slim_msg_txn *txn)
		 * If the state was DOWN, SSR UP notification will take
		 * care of putting the device in active state.
		 */
		ngd_slim_runtime_resume(dev->dev);
		ret = ngd_slim_runtime_resume(dev->dev);

		if (ret) {
			SLIM_ERR(dev, "slim resume failed ret:%d, state:%d",
					ret, dev->state);
			return -EREMOTEIO;
		}
	}

	else if (txn->mc & SLIM_MSG_CLK_PAUSE_SEQ_FLG)
@@ -364,23 +370,18 @@ static int ngd_xfer_msg(struct slim_controller *ctrl, struct slim_msg_txn *txn)
		 * Setting runtime status to suspended clears the error
		 * It also makes HW status cosistent with what SW has it here
		 */
		if (ret == -ENETRESET && dev->state == MSM_CTRL_DOWN) {
		if (ret < 0) {
			SLIM_ERR(dev, "slim ctrl vote failed ret:%d, state:%d",
					ret, dev->state);
			pm_runtime_set_suspended(dev->dev);
			msm_slim_put_ctrl(dev);
			return -EREMOTEIO;
		} else if (ret >= 0) {
		} else {
			dev->state = MSM_CTRL_AWAKE;
		}
	}
	mutex_lock(&dev->tx_lock);

	if (report_sat == false && dev->state != MSM_CTRL_AWAKE) {
		SLIM_ERR(dev, "controller not ready\n");
		mutex_unlock(&dev->tx_lock);
		pm_runtime_set_suspended(dev->dev);
		msm_slim_put_ctrl(dev);
		return -EREMOTEIO;
	}
	if (txn->mt == SLIM_MSG_MT_CORE &&
		(txn->mc == SLIM_MSG_MC_CONNECT_SOURCE ||
		txn->mc == SLIM_MSG_MC_CONNECT_SINK ||