Skip to content

Commit 2ac5fb3

Browse files
jing yangyangGustavoARSilva
authored andcommitted
firmware/psci: fix application of sizeof to pointer
sizeof when applied to a pointer typed expression gives the size of the pointer. ./drivers/firmware/psci/psci_checker.c:158:41-47: ERROR application of sizeof to pointer This issue was detected with the help of Coccinelle. Fixes: 7401056 ("drivers/firmware: psci_checker: stash and use topology_core_cpumask for hotplug tests") Cc: [email protected] Reported-by: Zeal Robot <[email protected]> Acked-by: Mark Rutland <[email protected]> Reviewed-by: Gustavo A. R. Silva <[email protected]> Signed-off-by: jing yangyang <[email protected]> Signed-off-by: Gustavo A. R. Silva <[email protected]>
1 parent 50740d5 commit 2ac5fb3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/firmware/psci/psci_checker.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ static int alloc_init_cpu_groups(cpumask_var_t **pcpu_groups)
155155
if (!alloc_cpumask_var(&tmp, GFP_KERNEL))
156156
return -ENOMEM;
157157

158-
cpu_groups = kcalloc(nb_available_cpus, sizeof(cpu_groups),
158+
cpu_groups = kcalloc(nb_available_cpus, sizeof(*cpu_groups),
159159
GFP_KERNEL);
160160
if (!cpu_groups) {
161161
free_cpumask_var(tmp);

0 commit comments

Comments
 (0)