]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
staging: rtl8192e: use struct pointer to get the size of the struct
authorSantha Meena Ramamoorthy <santhameena13@gmail.com>
Sat, 24 Feb 2018 21:46:33 +0000 (13:46 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 26 Feb 2018 14:47:40 +0000 (15:47 +0100)
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>
drivers/staging/rtl8192e/rtllib_wx.c

index 03fbff067fa441403c637d04e08cc8e242b268b5..74d4d2df3eb34c9eed04aa3604cbf55943fd4936 100644 (file)
@@ -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");