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

Commit 97f86044 authored by Gidon Studinski's avatar Gidon Studinski
Browse files

msm: ipa2: fix wrong check for memory allocation



Fix issue where after memory allocation, the wrong variable is tested for
memory allocation failure, which may result in NULL de-referencing.

Change-Id: Ibf221dfcd01fbdb5c953684c273f50f9059c30ac
CRs-Fixed: 1027443
Signed-off-by: default avatarGidon Studinski <gidons@codeaurora.org>
parent 450bd44d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -745,7 +745,7 @@ int __ipa_commit_rt_v2(enum ipa_ip_type ip)
	if (lcl) {
		cmd2 = kzalloc(sizeof(struct ipa_hw_imm_cmd_dma_shared_mem),
			GFP_KERNEL);
		if (cmd1 == NULL) {
		if (cmd2 == NULL) {
			IPAERR("Failed to alloc immediate command object\n");
			rc = -ENOMEM;
			goto fail_send_cmd1;