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

Commit e619f3a7 authored by Gidon Studinski's avatar Gidon Studinski
Browse files

msm: ipa: rm: change memory allocation from atomic to non-atomic



Change memory allocation to non-atomic before calling user callback.
Atomic memory allocation can fail with larger probability than
non-atomic one. Non-atomic allocation can be used here because this
function is used in a non-atomic context.

Change-Id: I7ef822d9dcad2b317ce9317d9cc2ac0cf91b7ecb
Acked-by: default avatarAdy Abraham <adya@qti.qualcomm.com>
Signed-off-by: default avatarGidon Studinski <gidons@codeaurora.org>
parent a5befd3f
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -189,9 +189,11 @@ void ipa_rm_resource_producer_notify_clients(
					link);
		if (notify_registered_only && !reg_info->explicit)
			continue;
		reg_info_cloned = kzalloc(sizeof(*reg_info_cloned), GFP_ATOMIC);
		if (!reg_info_cloned)
		reg_info_cloned = kzalloc(sizeof(*reg_info_cloned), GFP_KERNEL);
		if (!reg_info_cloned) {
			IPAERR("No memory\n");
			goto clone_list_failed;
		}
		reg_info_cloned->reg_params.notify_cb =
				reg_info->reg_params.notify_cb;
		reg_info_cloned->reg_params.user_data =