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

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

Merge "icnss: Avoid qmi register/unregister in case of qmi failure"

parents 08fcf48f a55b826e
Loading
Loading
Loading
Loading
+5 −7
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2015-2020, The Linux Foundation. All rights reserved.
 * Copyright (c) 2015-2021, The Linux Foundation. All rights reserved.
 */

#define pr_fmt(fmt) "icnss: " fmt
@@ -1081,26 +1081,26 @@ static int icnss_driver_event_server_arrive(void *data)
			goto qmi_registered;
		}
		ignore_assert = true;
		goto clear_server;
		goto fail;
	}

	if (!penv->msa_va) {
		icnss_pr_err("Invalid MSA address\n");
		ret = -EINVAL;
		goto clear_server;
		goto fail;
	}

	ret = wlfw_msa_mem_info_send_sync_msg(penv);
	if (ret < 0) {
		ignore_assert = true;
		goto clear_server;
		goto fail;
	}

	if (!test_bit(ICNSS_MSA0_ASSIGNED, &penv->state)) {
		ret = icnss_assign_msa_perm_all(penv,
						ICNSS_MSA_PERM_WLAN_HW_RW);
		if (ret < 0)
			goto clear_server;
			goto fail;
		set_bit(ICNSS_MSA0_ASSIGNED, &penv->state);
	}

@@ -1140,8 +1140,6 @@ static int icnss_driver_event_server_arrive(void *data)
err_setup_msa:
	icnss_assign_msa_perm_all(penv, ICNSS_MSA_PERM_HLOS_ALL);
	clear_bit(ICNSS_MSA0_ASSIGNED, &penv->state);
clear_server:
	icnss_clear_server(penv);
fail:
	ICNSS_ASSERT(ignore_assert);
qmi_registered: