diff options
Diffstat (limited to 'drivers/slimbus/messaging.c')
-rw-r--r-- | drivers/slimbus/messaging.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/slimbus/messaging.c b/drivers/slimbus/messaging.c index 242570a5e565..6f01d944f9c6 100644 --- a/drivers/slimbus/messaging.c +++ b/drivers/slimbus/messaging.c @@ -13,8 +13,8 @@ * * @ctrl: Controller handle * @reply: Reply received from the device - * @len: Length of the reply * @tid: Transaction ID received with which framework can associate reply. + * @len: Length of the reply * * Called by controller to inform framework about the response received. * This helps in making the API asynchronous, and controller-driver doesn't need @@ -148,8 +148,9 @@ int slim_do_transfer(struct slim_controller *ctrl, struct slim_msg_txn *txn) } ret = ctrl->xfer_msg(ctrl, txn); - - if (!ret && need_tid && !txn->msg->comp) { + if (ret == -ETIMEDOUT) { + slim_free_txn_tid(ctrl, txn); + } else if (!ret && need_tid && !txn->msg->comp) { unsigned long ms = txn->rl + HZ; time_left = wait_for_completion_timeout(txn->comp, |