mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-10-16 22:39:48 +00:00
staging: r8188eu: use sizeof(*pvar) for allocating structs
Use sizeof(*pvar) instead of sizeof(struct var) when allocating memory. This conforms to Linux kernel coding style, improves readability, and decreases the opportunity for bugs if the pointer variable type is changed. Issue found by checkpatch messages of the following format: CHECK: Prefer kzalloc(sizeof(*pvar)...) over kzalloc(sizeof(struct var)...) Signed-off-by: Rebecca Mckeever <remckee0@gmail.com> Link: https://lore.kernel.org/r/YkXh1HBqaHwT38UC@bertie Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
acc24ef13e
commit
a76d5a6e3d
2 changed files with 10 additions and 10 deletions
Loading…
Add table
Add a link
Reference in a new issue