Browse Source

dataipa: ipa_uc: Command size calculation fix

* sizeof was used on a pointer rather than actual type

Change-Id: I2a57af6353ce166697af43a35da549532e5ec45c
Signed-off-by: Eliad Ben Yishay <[email protected]>
Eliad Ben Yishay 3 years ago
parent
commit
4f49c7b090
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/platform/msm/ipa/ipa_v3/ipa_uc.c

+ 1 - 1
drivers/platform/msm/ipa/ipa_v3/ipa_uc.c

@@ -1514,7 +1514,7 @@ int ipa3_uc_memcpy(phys_addr_t dest, phys_addr_t src, int len)
 	struct IpaHwMemCopyData_t *cmd;
 
 	IPADBG("dest 0x%pa src 0x%pa len %d\n", &dest, &src, len);
-	mem.size = sizeof(cmd);
+	mem.size = sizeof(*cmd);
 	mem.base = dma_alloc_coherent(ipa3_ctx->pdev, mem.size, &mem.phys_base,
 		GFP_KERNEL);
 	if (!mem.base) {