aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSudeep Holla <[email protected]>2023-10-31 14:13:35 +0000
committerSudeep Holla <[email protected]>2023-11-13 11:51:26 +0000
commit05857a1eb723190923b091a857184ced17a83770 (patch)
tree9a7163a996697fafac600004d7fd46dcf20b9a65
parent6d67cbe67a86a87307df0c6fafa74394a6820ad6 (diff)
firmware: arm_ffa: Fix the size of the allocation in ffa_partitions_cleanup()
Arry of pointer to struct ffa_dev_part_info needs to be allocated to fetch the pointers stored in XArray. However, currently we allocate the entire structure instead of just pointers. Fix the allocation size. This will also eliminate the below Smatch istatic checker warning: | drivers/firmware/arm_ffa/driver.c:1251 ffa_partitions_cleanup() | warn: double check that we're allocating correct size: 8 vs 88 Reported-by: Dan Carpenter <[email protected]> Closes: https://lore.kernel.org/all/[email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sudeep Holla <[email protected]>
-rw-r--r--drivers/firmware/arm_ffa/driver.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/firmware/arm_ffa/driver.c b/drivers/firmware/arm_ffa/driver.c
index 49ebdc2775dd..034bce8a2ca1 100644
--- a/drivers/firmware/arm_ffa/driver.c
+++ b/drivers/firmware/arm_ffa/driver.c
@@ -1248,7 +1248,7 @@ static void ffa_partitions_cleanup(void)
if (!count)
return;
- info = kcalloc(count, sizeof(**info), GFP_KERNEL);
+ info = kcalloc(count, sizeof(*info), GFP_KERNEL);
if (!info)
return;