Staging: drivers: rtl8188eu: use sizeof(*ptr) instead of sizeof(struct)
authorJacky Boen <aqiank@gmail.com>
Sun, 1 May 2016 15:50:39 +0000 (23:50 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 1 May 2016 21:34:53 +0000 (14:34 -0700)
Fix coding style issue

Signed-off-by: Jacky Boen <aqiank@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/hal/usb_halinit.c

index 363f3a34ddce48abb4ccac7c7a09edbe45107c48..87ea3b8449518e6a1e508a8434a139588876da51 100644 (file)
@@ -2072,8 +2072,7 @@ void rtl8188eu_set_hal_ops(struct adapter *adapt)
 {
        struct hal_ops  *halfunc = &adapt->HalFunc;
 
-
-       adapt->HalData = kzalloc(sizeof(struct hal_data_8188e), GFP_KERNEL);
+       adapt->HalData = kzalloc(sizeof(*adapt->HalData), GFP_KERNEL);
        if (!adapt->HalData)
                DBG_88E("cant not alloc memory for HAL DATA\n");