msm: ipa3: Added fix to avoid the sys pointer null dereference

When we failed to setup the wan pipes, we will make apps_to_ipa3
hdl to 0, so in subsequent teardown, ep hdl passed will be 0, if ep 0 is
not setup, we will access a null sys, so to avoid that, we have
added apps_to_ipa3_hdl value checker in setup_sys like if it is -1
then only we are assigning it to 0, other wise it's value won't change,
so that in teardown, it won't access a invalid ep hdl or sys.

Change-Id: I9a8e11815f7a397fbc1a0c809711fda618dab7d1
Signed-off-by: Shiva Ganesh <quic_shivgane@quicinc.com>
1 file changed