Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 12e6c73b authored by Praveen Kurapati's avatar Praveen Kurapati
Browse files

msm: ipa3: Check IPA initialized in modem SSR events



In local modem SSR events not checking if IPA is initialized
or not. Added check to see IPA is initialized.

Change-Id: Ica21a148e5c11cc14e5e4c3bcbd609572b588386
Signed-off-by: default avatarPraveen Kurapati <pkurapat@codeaurora.org>
parent 1df57774
Loading
Loading
Loading
Loading
+10 −1
Original line number Original line Diff line number Diff line
/* Copyright (c) 2014-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2014-2019, The Linux Foundation. All rights reserved.
 *
 *
 * This program is free software; you can redistribute it and/or modify
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
 * it under the terms of the GNU General Public License version 2 and
@@ -2818,6 +2818,11 @@ static int ipa3_lcl_mdm_ssr_notifier_cb(struct notifier_block *this,
	if (!ipa3_rmnet_ctx.ipa_rmnet_ssr)
	if (!ipa3_rmnet_ctx.ipa_rmnet_ssr)
		return NOTIFY_DONE;
		return NOTIFY_DONE;


	if (!ipa3_ctx) {
		IPAWANERR_RL("ipa3_ctx was not initialized\n");
		return NOTIFY_DONE;
	}

	if (ipa3_ctx->platform_type == IPA_PLAT_TYPE_APQ) {
	if (ipa3_ctx->platform_type == IPA_PLAT_TYPE_APQ) {
		IPAWANERR("Local modem SSR event=%lu on APQ platform\n",
		IPAWANERR("Local modem SSR event=%lu on APQ platform\n",
			code);
			code);
@@ -4332,6 +4337,10 @@ static int __init ipa3_wwan_init(void)
	struct ipa_tether_device_info *teth_ptr = NULL;
	struct ipa_tether_device_info *teth_ptr = NULL;
	void *ssr_hdl;
	void *ssr_hdl;


	if (!ipa3_ctx) {
		IPAWANERR_RL("ipa3_ctx was not initialized\n");
		return -EINVAL;
	}
	rmnet_ipa3_ctx = kzalloc(sizeof(*rmnet_ipa3_ctx), GFP_KERNEL);
	rmnet_ipa3_ctx = kzalloc(sizeof(*rmnet_ipa3_ctx), GFP_KERNEL);


	if (!rmnet_ipa3_ctx)
	if (!rmnet_ipa3_ctx)