Skip to content

Commit 05857a1

Browse files
committed
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]>
1 parent 6d67cbe commit 05857a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/firmware/arm_ffa/driver.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1248,7 +1248,7 @@ static void ffa_partitions_cleanup(void)
12481248
if (!count)
12491249
return;
12501250

1251-
info = kcalloc(count, sizeof(**info), GFP_KERNEL);
1251+
info = kcalloc(count, sizeof(*info), GFP_KERNEL);
12521252
if (!info)
12531253
return;
12541254

0 commit comments

Comments
 (0)