libertas_tf: Fix warning in lbtf_rx for stats struct
authorPrarit Bhargava <prarit@redhat.com>
Thu, 10 Jun 2010 12:08:42 +0000 (08:08 -0400)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 14 Jun 2010 19:04:29 +0000 (15:04 -0400)
Fixes linux-2.6 warning:

drivers/net/wireless/libertas_tf/main.c: In function 'lbtf_rx':
drivers/net/wireless/libertas_tf/main.c:578: warning: 'stats.antenna' is used uninitialized in this function
drivers/net/wireless/libertas_tf/main.c:578: warning: 'stats.mactime' is used uninitialized in this function

stats struct needs to be set to 0 before use.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/libertas_tf/main.c

index 6a04c2157f73f3788109afcdfbc50c4ecdf62b9e..817fffc0de4b5093c869fc11a5f72aa9ca0ab3ba 100644 (file)
@@ -549,7 +549,7 @@ int lbtf_rx(struct lbtf_private *priv, struct sk_buff *skb)
 
        prxpd = (struct rxpd *) skb->data;
 
-       stats.flag = 0;
+       memset(&stats, 0, sizeof(stats));
        if (!(prxpd->status & cpu_to_le16(MRVDRV_RXPD_STATUS_OK)))
                stats.flag |= RX_FLAG_FAILED_FCS_CRC;
        stats.freq = priv->cur_freq;