Merge "ngd_slim: Fix return paths in transfer function"
diff --git a/drivers/slimbus/slim-msm-ngd.c b/drivers/slimbus/slim-msm-ngd.c
index 299d3ee..c29b71e 100644
--- a/drivers/slimbus/slim-msm-ngd.c
+++ b/drivers/slimbus/slim-msm-ngd.c
@@ -299,7 +299,13 @@
* 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 @@
* 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 ||