All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] wireless: at76c50x: allocating too much data
@ 2012-04-20  6:47 ` Dan Carpenter
  0 siblings, 0 replies; 26+ messages in thread
From: Dan Carpenter @ 2012-04-20  6:47 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, kernel-janitors

This is a cut and paste mistake, sizeof(struct mib_local) was intended
instead of sizeof(struct mib_phy).  The call to at76_get_mib() uses
sizeof(struct mib_local) correctly.

The current code works fine because mib_phy structs are larger than
mib_local structs.  But we may as well clean it up.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/net/wireless/at76c50x-usb.c b/drivers/net/wireless/at76c50x-usb.c
index faa8bcb..0bba5ea 100644
--- a/drivers/net/wireless/at76c50x-usb.c
+++ b/drivers/net/wireless/at76c50x-usb.c
@@ -1122,7 +1122,7 @@ exit:
 static void at76_dump_mib_local(struct at76_priv *priv)
 {
 	int ret;
-	struct mib_local *m = kmalloc(sizeof(struct mib_phy), GFP_KERNEL);
+	struct mib_local *m = kmalloc(sizeof(struct mib_local), GFP_KERNEL);
 
 	if (!m)
 		return;

^ permalink raw reply related	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2012-04-21 15:13 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-20  6:47 [patch] wireless: at76c50x: allocating too much data Dan Carpenter
2012-04-20  6:47 ` Dan Carpenter
2012-04-20  8:57 ` Julian Calaby
2012-04-20  8:57   ` Julian Calaby
2012-04-20  9:14   ` Dan Carpenter
2012-04-20  9:14     ` Dan Carpenter
2012-04-20 18:14     ` Kalle Valo
2012-04-20 18:14       ` Kalle Valo
2012-04-21 12:23       ` [patch v2] " Dan Carpenter
2012-04-21 12:23         ` Dan Carpenter
2012-04-21 12:45       ` [patch] " Dan Carpenter
2012-04-21 12:45         ` Dan Carpenter
2012-04-21 13:19         ` Julia Lawall
2012-04-21 13:19           ` Julia Lawall
2012-04-21 13:51         ` Julia Lawall
2012-04-21 13:51           ` Julia Lawall
2012-04-21 14:51           ` Dan Carpenter
2012-04-21 14:51             ` Dan Carpenter
2012-04-21 14:51             ` Julia Lawall
2012-04-21 14:51               ` Julia Lawall
2012-04-21 14:59             ` Dan Carpenter
2012-04-21 14:59               ` Dan Carpenter
2012-04-21 15:12             ` Dan Carpenter
2012-04-21 15:12               ` Dan Carpenter
2012-04-21 15:13               ` Julia Lawall
2012-04-21 15:13                 ` Julia Lawall

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.