qlge: Fix spin_lock warning.
[pandora-kernel.git] / drivers / net / ethoc.c
index 91a9b1a..b7311bc 100644 (file)
@@ -404,7 +404,6 @@ static int ethoc_rx(struct net_device *dev, int limit)
                                void *src = priv->membase + bd.addr;
                                memcpy_fromio(skb_put(skb, size), src, size);
                                skb->protocol = eth_type_trans(skb, dev);
-                               dev->last_rx = jiffies;
                                priv->stats.rx_packets++;
                                priv->stats.rx_bytes += size;
                                netif_receive_skb(skb);
@@ -802,7 +801,7 @@ static struct net_device_stats *ethoc_stats(struct net_device *dev)
        return &priv->stats;
 }
 
-static int ethoc_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t ethoc_start_xmit(struct sk_buff *skb, struct net_device *dev)
 {
        struct ethoc *priv = netdev_priv(dev);
        struct ethoc_bd bd;
@@ -811,7 +810,7 @@ static int ethoc_start_xmit(struct sk_buff *skb, struct net_device *dev)
 
        if (unlikely(skb->len > ETHOC_BUFSIZ)) {
                priv->stats.tx_errors++;
-               return -EMSGSIZE;
+               goto out;
        }
 
        entry = priv->cur_tx % priv->num_tx;
@@ -840,9 +839,9 @@ static int ethoc_start_xmit(struct sk_buff *skb, struct net_device *dev)
        }
 
        dev->trans_start = jiffies;
-       dev_kfree_skb(skb);
-
        spin_unlock_irq(&priv->lock);
+out:
+       dev_kfree_skb(skb);
        return NETDEV_TX_OK;
 }
 
@@ -894,7 +893,7 @@ static int ethoc_probe(struct platform_device *pdev)
 
        mmio = devm_request_mem_region(&pdev->dev, res->start,
                        res->end - res->start + 1, res->name);
-       if (!res) {
+       if (!mmio) {
                dev_err(&pdev->dev, "cannot request I/O memory space\n");
                ret = -ENXIO;
                goto free;