net: ifb error path loop fix
[powerpc.git] / drivers / net / ifb.c
index 6469130..c4ca7c9 100644 (file)
@@ -154,8 +154,8 @@ static int ifb_xmit(struct sk_buff *skb, struct net_device *dev)
        int ret = 0;
        u32 from = G_TC_FROM(skb->tc_verd);
 
-       stats->tx_packets++;
-       stats->tx_bytes+=skb->len;
+       stats->rx_packets++;
+       stats->rx_bytes+=skb->len;
 
        if (!from || !skb->input_dev) {
 dropped:
@@ -200,8 +200,8 @@ static struct net_device_stats *ifb_get_stats(struct net_device *dev)
 
        pr_debug("tasklets stats %ld:%ld:%ld:%ld:%ld:%ld:%ld:%ld:%ld \n",
                dp->st_task_enter, dp->st_txq_refl_try, dp->st_rxq_enter,
-               dp->st_rx2tx_tran dp->st_rxq_notenter, dp->st_rx_frm_egr,
-               dp->st_rx_frm_ing, dp->st_rxq_check, dp->st_rxq_rsch );
+               dp->st_rx2tx_tran, dp->st_rxq_notenter, dp->st_rx_frm_egr,
+               dp->st_rx_frm_ing, dp->st_rxq_check, dp->st_rxq_rsch);
 
        return stats;
 }
@@ -271,8 +271,7 @@ static int __init ifb_init_module(void)
        for (i = 0; i < numifbs && !err; i++)
                err = ifb_init_one(i);
        if (err) {
-               i--;
-               while (--i >= 0)
+               while (i--)
                        ifb_free_one(i);
        }