Re: [PATCH 2/8] staging: et131x: In et131x_tx(), don't return NETDEV_TX_BUSY, just drop the packet

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 11, 2014 at 10:59:40PM +0100, Mark Einon wrote:
> +	if (send_packet(skb, adapter))
> +		goto drop_err;
> +
> +	return NETDEV_TX_OK;
> +
> +drop_err:
> +	dev_kfree_skb_any(skb);
> +	skb = NULL;

No need to set "skb = NULL;".  It's on the stack after all.

regards,
dan carpenter

> +	adapter->netdev->stats.tx_dropped++;
> +	return NETDEV_TX_OK;
>  }

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux