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>
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;
}