From: Vitaly Osipov <vitaly.osipov@gmail.com>
To: Larry Finger <Larry.Finger@lwfinger.net>,
Florian Schilhabel <florian.c.schilhabel@googlemail.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] staging: rtl8712: use kcalloc instead of kmalloc(x*y,...)
Date: Sat, 14 Jun 2014 21:48:13 +1000 [thread overview]
Message-ID: <20140614114813.GA8466@witts-MacBook-Pro.local> (raw)
Replaced kmalloc(x*y, ...) with kcalloc(x,y,...)
Signed-off-by: Vitaly Osipov <vitaly.osipov@gmail.com>
---
drivers/staging/rtl8712/rtl871x_mlme.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8712/rtl871x_mlme.c b/drivers/staging/rtl8712/rtl871x_mlme.c
index 26b8f37..8561841 100644
--- a/drivers/staging/rtl8712/rtl871x_mlme.c
+++ b/drivers/staging/rtl8712/rtl871x_mlme.c
@@ -62,8 +62,7 @@ static sint _init_mlme_priv(struct _adapter *padapter)
_init_queue(&(pmlmepriv->scanned_queue));
set_scanned_network_val(pmlmepriv, 0);
memset(&pmlmepriv->assoc_ssid, 0, sizeof(struct ndis_802_11_ssid));
- pbuf = kmalloc(MAX_BSS_CNT * (sizeof(struct wlan_network)),
- GFP_ATOMIC);
+ pbuf = kcalloc(MAX_BSS_CNT, sizeof(struct wlan_network), GFP_ATOMIC);
if (pbuf == NULL)
return _FAIL;
pmlmepriv->free_bss_buf = pbuf;
--
1.9.1
next reply other threads:[~2014-06-14 11:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-14 11:48 Vitaly Osipov [this message]
2014-06-14 14:08 ` [PATCH 2/2] staging: rtl8712: use kcalloc instead of kmalloc(x*y, ...) Jonas Gorski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140614114813.GA8466@witts-MacBook-Pro.local \
--to=vitaly.osipov@gmail.com \
--cc=Larry.Finger@lwfinger.net \
--cc=andriy.shevchenko@linux.intel.com \
--cc=devel@driverdev.osuosl.org \
--cc=florian.c.schilhabel@googlemail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®