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/5b526d8c178d89328de935ff4ff57651bdd8379b.1649233201.git.remckee0@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
cb9d73dbe2
commit
808d5dbeec
1 changed files with 34 additions and 34 deletions
Loading…
Add table
Add a link
Reference in a new issue