mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-13 10:38:44 -04:00
staging: wilc1000: use sizeof(*wdev) to allocate memory in wilc_wfi_cfg_alloc()
Fix below reported checkpatch issues in wilc_wfi_cfg_alloc(). kzalloc(sizeof(*wdev)...) over kzalloc(sizeof(struct wireless_dev) Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
3f27ec8733
commit
c0a7882312
@@ -2184,7 +2184,7 @@ static struct wireless_dev *wilc_wfi_cfg_alloc(void)
|
||||
{
|
||||
struct wireless_dev *wdev;
|
||||
|
||||
wdev = kzalloc(sizeof(struct wireless_dev), GFP_KERNEL);
|
||||
wdev = kzalloc(sizeof(*wdev), GFP_KERNEL);
|
||||
if (!wdev)
|
||||
goto _fail_;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user