lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1499164891-7185-1-git-send-email-rjdurga@gmail.com>
Date:   Tue,  4 Jul 2017 16:11:31 +0530
From:   Jaya Durga <rjdurga@...il.com>
To:     gregkh@...uxfoundation.org
Cc:     Larry.Finger@...inger.net, florian.c.schilhabel@...glemail.com,
        devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
        Jaya Durga <rjdurga@...il.com>, Jaya Durga <jayad@...c.in>
Subject: [PATCH 7/7] Staging: rtl8712 : rtl871x_io.c:fix coding style of kmalloc usage

CHECK: multiple assignments should be avoided
CHECK: Prefer kmalloc(sizeof(*pintf_hdl->pintfpriv)...) 
over kmalloc(sizeof(struct intf_priv)...)

Signed-off-by: Jaya Durga <jayad@...c.in>
---
 drivers/staging/rtl8712/rtl871x_io.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8712/rtl871x_io.c b/drivers/staging/rtl8712/rtl871x_io.c
index 3a10940..b8b47c4 100644
--- a/drivers/staging/rtl8712/rtl871x_io.c
+++ b/drivers/staging/rtl8712/rtl871x_io.c
@@ -60,8 +60,9 @@ static uint _init_intf_hdl(struct _adapter *padapter,
 	set_intf_funs = &(r8712_usb_set_intf_funs);
 	set_intf_ops = &r8712_usb_set_intf_ops;
 	init_intf_priv = &r8712_usb_init_intf_priv;
-	pintf_priv = pintf_hdl->pintfpriv = kmalloc(sizeof(struct intf_priv),
+	pintf_hdl->pintfpriv = kmalloc(sizeof(*pintf_hdl->pintfpriv),
 						    GFP_ATOMIC);
+	pintf_priv = pintf_hdl->pintfpriv;
 	if (pintf_priv == NULL)
 		goto _init_intf_hdl_fail;
 	pintf_hdl->adapter = (u8 *)padapter;
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ