From 0670549caec78007458675bd7029543b28e9fbe8 Mon Sep 17 00:00:00 2001 From: Jagadeesh Ponduru Date: Fri, 25 Nov 2022 09:27:40 +0530 Subject: msm: ipa3: adding a NULL check for ipa3_qmi_ctx before accessing it In case of frequent SSR triggered, there is a chance that the ipa3_qmi_ctx is getting freed and not being initialized promptly as it will be through WQ. So, adding a check before accessing it in the subsequent SSR. Change-Id: I9be56787084baba92a01d5ce5258e84f52725e2c Signed-off-by: Jagadeesh Ponduru --- drivers/platform/msm/ipa/ipa_v3/rmnet_ipa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/msm/ipa/ipa_v3/rmnet_ipa.c b/drivers/platform/msm/ipa/ipa_v3/rmnet_ipa.c index af242f9..60ed1a0 100644 --- a/drivers/platform/msm/ipa/ipa_v3/rmnet_ipa.c +++ b/drivers/platform/msm/ipa/ipa_v3/rmnet_ipa.c @@ -3778,7 +3778,7 @@ static int ipa3_wwan_remove(struct platform_device *pdev) ipa3_del_a7_qmap_hdr(); } ipa3_del_mux_qmap_hdrs(); - if (!ipa3_qmi_ctx->modem_cfg_emb_pipe_flt) + if (ipa3_qmi_ctx && !ipa3_qmi_ctx->modem_cfg_emb_pipe_flt) ipa3_wwan_del_ul_flt_rule_to_ipa(); ipa3_cleanup_deregister_intf(); /* reset dl_csum_offload_enabled */ -- cgit v1.2.3