diff options
| author | Linux Build Service Account <lnxbuild@quicinc.com> | 2017-05-25 15:51:54 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-05-25 15:51:54 -0700 |
| commit | 88e1c449dcbc3d6e2e1df799c346ed99343d8734 (patch) | |
| tree | 2e1f4849dce34c366929cdb784c7c2b6149f89be | |
| parent | eadd4e31817140be75591941d446f07a30ff295c (diff) | |
| parent | 4f7c1784fa1452299d7bfec2b758c905ccdd18c5 (diff) | |
Merge "spcom: increment channel reference count after successful glink_open()"
| -rw-r--r-- | drivers/soc/qcom/spcom.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/soc/qcom/spcom.c b/drivers/soc/qcom/spcom.c index c2af34926b37..f406292a6c4d 100644 --- a/drivers/soc/qcom/spcom.c +++ b/drivers/soc/qcom/spcom.c @@ -721,9 +721,6 @@ static int spcom_open(struct spcom_channel *ch, unsigned int timeout_msec) pr_err("channel [%s] already in use.\n", name); goto exit_err; } - ch->ref_count++; - ch->pid = current_pid(); - ch->txn_id = INITIAL_TXN_ID; pr_debug("ch [%s] opened by PID [%d], count [%d]\n", name, ch->pid, ch->ref_count); @@ -748,7 +745,12 @@ static int spcom_open(struct spcom_channel *ch, unsigned int timeout_msec) } else { pr_debug("glink_open [%s] ok.\n", name); } + + /* init channel context after successful open */ ch->glink_handle = handle; + ch->ref_count++; + ch->pid = current_pid(); + ch->txn_id = INITIAL_TXN_ID; pr_debug("Wait for connection on channel [%s] timeout_msec [%d].\n", name, timeout_msec); |
