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

Commit 805df07a authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: ipa3: Check IPA initialized in modem SSR events"

parents 5bf8edcb 12e6c73b
Loading
Loading
Loading
Loading
+10 −1
Original line number 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
 * 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)
		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) {
		IPAWANERR("Local modem SSR event=%lu on APQ platform\n",
			code);
@@ -4332,6 +4337,10 @@ static int __init ipa3_wwan_init(void)
	struct ipa_tether_device_info *teth_ptr = NULL;
	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);

	if (!rmnet_ipa3_ctx)