Skip to content
Commit bd9dc62c authored by Vitaly Osipov's avatar Vitaly Osipov Committed by Greg Kroah-Hartman
Browse files

staging: rtl8712: replace kmalloc(..., sizeof(T))



As suggested by Andy Shevchenko on driverdev-devel, replace
v = ... sizeof(struct type_of_v) -> sizeof(*v)

Based on a cocci patch along the lines of

@@
type T;
expression E;
identifier V;
@@

T *V;
...
- V = kmalloc(sizeof(T), E);
+ V = kmalloc(sizeof(*V), E);

@@
type T;
expression E;
identifier V;
@@

T *V;
...
- V = kzalloc(sizeof(T), E);
+ V = kzalloc(sizeof(*V), E);

Signed-off-by: default avatarVitaly Osipov <vitaly.osipov@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3ae70746
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment