diff options
author | Shiv Maliyappanahalli <smaliyap@codeaurora.org> | 2016-07-08 13:00:23 -0700 |
---|---|---|
committer | Kyle Yan <kyan@codeaurora.org> | 2016-07-11 14:27:35 -0700 |
commit | 5f0a4b1fef4c17e62c69f552c012f65a699e0dd1 (patch) | |
tree | d87724896687d26ec27db978da1b3b1e51064670 | |
parent | f55cbb338591167febfda21e07a984913190673f (diff) |
drivers: soc: set apr handle to NULL on glink_open error
After sub system restart, opening glink channel while
lpass transport is not up results in failure and returns
error pointer. APR glink client although returns error for
the first glink command, does not set the apr handle to NULL
and incorrectly assumes err pointer as a valid handle when
opening the channel again.
Fix this by updating the apr handle to NULL when glink_open()
fails.
Change-Id: I53a219b1ebed5bc3593d500d80d580aac6431ab5
Signed-off-by: Shiv Maliyappanahalli <smaliyap@codeaurora.org>
-rw-r--r-- | drivers/soc/qcom/qdsp6v2/apr_tal_glink.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/soc/qcom/qdsp6v2/apr_tal_glink.c b/drivers/soc/qcom/qdsp6v2/apr_tal_glink.c index 14e46b38c6df..7e5f1661932f 100644 --- a/drivers/soc/qcom/qdsp6v2/apr_tal_glink.c +++ b/drivers/soc/qcom/qdsp6v2/apr_tal_glink.c @@ -330,6 +330,7 @@ struct apr_svc_ch_dev *apr_tal_open(uint32_t clnt, uint32_t dest, uint32_t dl, if (IS_ERR_OR_NULL(apr_ch->handle)) { pr_err("%s: glink_open failed %s\n", __func__, svc_names[dest][clnt]); + apr_ch->handle = NULL; goto unlock; } |