Skip to content

Commit 9ac25cd

Browse files
jing yangyanggregkh
authored andcommitted
firmware/psci: fix application of sizeof to pointer
commit 2ac5fb3 upstream. 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: stable@vger.kernel.org Reported-by: Zeal Robot <zealci@zte.com.cn> Acked-by: Mark Rutland <mark.rutland@arm.com> Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: jing yangyang <jing.yangyang@zte.com.cn> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent dd189fe commit 9ac25cd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎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)