Thread (10 messages) 10 messages, 2 authors, 2016-05-30
STALE3665d

[PATCH v2 10/10] nl80211: Prefer kcalloc over kzalloc

From: Kirtika Ruchandani <hidden>
Date: 2016-05-30 02:55:02
Also in: linux-wireless
Subsystem: 802.11 (including cfg80211/nl80211), the rest · Maintainers: Johannes Berg, Linus Torvalds

This patch fixes the checkpatch.pl warning -
"prefer kcalloc over kzalloc with multiply"

Signed-off-by: Kirtika Ruchandani <redacted>
---
 net/wireless/nl80211.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 46757af..2964406 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -9482,7 +9482,7 @@ static int nl80211_parse_wowlan_nd(struct cfg80211_registered_device *rdev,
 	struct nlattr **tb;
 	int err;

-	tb = kzalloc(NUM_NL80211_ATTR * sizeof(*tb), GFP_KERNEL);
+	tb = kcalloc(NUM_NL80211_ATTR, sizeof(*tb), GFP_KERNEL);
 	if (!tb)
 		return -ENOMEM;
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help