lkml.org 
[lkml]   [2016]   [May]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 11/11] Staging: drivers: rtl8188eu: use sizeof(*ptr) instead of sizeof(struct)
Date
Fix coding style issue

Signed-off-by: Jacky Boen <aqiank@gmail.com>
---
drivers/staging/rtl8188eu/hal/usb_halinit.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8188eu/hal/usb_halinit.c b/drivers/staging/rtl8188eu/hal/usb_halinit.c
index ef04638..13c1277 100644
--- a/drivers/staging/rtl8188eu/hal/usb_halinit.c
+++ b/drivers/staging/rtl8188eu/hal/usb_halinit.c
@@ -2077,8 +2077,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");

--
2.7.4
\
 
 \ /
  Last update: 2016-05-01 18:21    [W:0.050 / U:0.388 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site