char: msm_smd_pkt: Avoid unloading modem in smd_pkt_open
In smd_pkt_open, it is possible to decrement the PIL reference count for
the modem enough times to unload a remote subsystem. If an error is
returned while waiting for the open sequence to complete, the remote
subsystem's reference count will be decremented, and then decremented
again when the channel is subsequently closed.
To avoid this, close the channel and set the channel reference to NULL
when an error is returned while waiting for the open sequence to
complete. Also, set the PIL reference to the remote subsystem to NULL
after putting the reference.
CRs-Fixed: 887371
Change-Id: I72eb04f74a76b8d9450b340cfcbb288badfebdc0
Signed-off-by:
Steven Cahail <scahail@codeaurora.org>
Loading
Please register or sign in to comment