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

Commit 763b462c authored by Skylar Chang's avatar Skylar Chang
Browse files

msm: rmnet_ipa3: fix the crash issue



Seeing rmnet_ipa3 causing the device
crashed when ipa3 not initialized. The
fix is to add the check when rmnet_ipa
try to register the
ipa3_register_ipa_ready_cb.

Change-Id: I55618784befc61e37e68d3b8d8c7c5c30f45e4fc
Signed-off-by: default avatarSkylar Chang <chiaweic@codeaurora.org>
parent 2642c0ad
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -5086,6 +5086,11 @@ int ipa3_register_ipa_ready_cb(void (*ipa_ready_cb)(void *), void *user_data)
{
	struct ipa3_ready_cb_info *cb_info = NULL;

	/* check ipa3_ctx existed or not */
	if (!ipa3_ctx) {
		IPADBG("IPA driver haven't initialized\n");
		return -ENXIO;
	}
	mutex_lock(&ipa3_ctx->lock);
	if (ipa3_ctx->ipa_initialization_complete) {
		mutex_unlock(&ipa3_ctx->lock);