staging: rtl8188eu: core: Use sizeof(*p) instead of sizeof(struct P) for memory alloc...
authorMamta Shukla <mamtashukla555@gmail.com>
Sat, 13 Oct 2018 06:56:06 +0000 (12:26 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 19 Oct 2018 19:10:45 +0000 (21:10 +0200)
commit95f7ed6b7d29052c30cfed47b838f39bf432a910
tree17d4477027a54c48f25e4059de4e2740818b596c
parent8b8429b00086d0d2a4eb6dd0ec96d4020d5fe8c8
staging: rtl8188eu: core: Use sizeof(*p) instead of sizeof(struct P) for memory allocation

Use sizeof(*ptr) instead of sizeof(ptr_type) makes memory
allocation easy in case the type of pointer changes.
Fix all checkpatch reported issues for "CHECK: Prefer
kzalloc(sizeof(*<p>)...) over kzalloc(sizeof(struct <P>)...)".

Signed-off-by: Mamta Shukla <mamtashukla555@gmail.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_cmd.c