summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8192e/rtllib_wx.c
diff options
context:
space:
mode:
authorSantha Meena Ramamoorthy <santhameena13@gmail.com>2018-02-24 13:46:33 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-02-26 15:47:40 +0100
commit3294a9c58ac5f658b423cce78343b19dd1eee61d (patch)
treef713550d3ccac02859dce4ff765712a710bfc844 /drivers/staging/rtl8192e/rtllib_wx.c
parent57352e12971e537ac641b0bf64709c958c6c7e78 (diff)
downloadlinux-3294a9c58ac5f658b423cce78343b19dd1eee61d.tar.bz2
staging: rtl8192e: use struct pointer to get the size of the struct
Use pointer to the structure to get the size of the structure in order to conform to the Linux kernel coding style. Issue found using checkpatch. Signed-off-by: Santha Meena Ramamoorthy <santhameena13@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8192e/rtllib_wx.c')
-rw-r--r--drivers/staging/rtl8192e/rtllib_wx.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/rtl8192e/rtllib_wx.c b/drivers/staging/rtl8192e/rtllib_wx.c
index 03fbff067fa4..74d4d2df3eb3 100644
--- a/drivers/staging/rtl8192e/rtllib_wx.c
+++ b/drivers/staging/rtl8192e/rtllib_wx.c
@@ -371,8 +371,7 @@ int rtllib_wx_set_encode(struct rtllib_device *ieee,
struct lib80211_crypt_data *new_crypt;
/* take WEP into use */
- new_crypt = kzalloc(sizeof(struct lib80211_crypt_data),
- GFP_KERNEL);
+ new_crypt = kzalloc(sizeof(*new_crypt), GFP_KERNEL);
if (new_crypt == NULL)
return -ENOMEM;
new_crypt->ops = lib80211_get_crypto_ops("R-WEP");