Commit 2b897a1c authored by André Draszik's avatar André Draszik Committed by Lee Jones
Browse files

mfd: sec-common: Use sizeof(*var), not sizeof(struct type_of_var)



Using sizeof(*var) is generally preferred over using the size of its
open-coded type when allocating memory.

This helps avoiding bugs when the variable type changes but the memory
allocation isn't updated, and it simplifies renaming of the struct if
ever necessary.

No functional change.

Signed-off-by: default avatarAndré Draszik <andre.draszik@linaro.org>
Link: https://lore.kernel.org/r/20250409-s2mpg10-v4-20-d66d5f39b6bf@linaro.org


Signed-off-by: default avatarLee Jones <lee@kernel.org>
parent 856c6514
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment