I am resending this patch as the email for Ben is wrong in the maintainer script due to getting automated message from solarflare. Signed-off-by: Nick <xerofo...@gmail.com> --- drivers/net/ethernet/oki-semi/ pch_gbe/pch_gbe_main.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c index 73e6683..704cf63 100644 --- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c +++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c @@ -1515,6 +1515,8 @@ static void pch_gbe_alloc_tx_buffers(struct pch_gbe_adapter *adapter, for (i = 0; i < tx_ring->count; i++) { buffer_info = &tx_ring->buffer_info[i]; skb = netdev_alloc_skb(adapter->netdev, bufsz); + if (!skb) + return NULL; skb_reserve(skb, PCH_GBE_DMA_ALIGN); buffer_info->skb = skb; tx_desc = PCH_GBE_TX_DESC(*tx_ring, i); Thanks Nick On Sun, Jun 15, 2014 at 12:05 AM, Nick <xerofo...@gmail.com> wrote: > Signed-off-by: Nick <xerofo...@gmail.com> > --- > drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c > b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c > index 73e6683..704cf63 100644 > --- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c > +++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c > @@ -1515,6 +1515,8 @@ static void pch_gbe_alloc_tx_buffers(struct > pch_gbe_adapter *adapter, > for (i = 0; i < tx_ring->count; i++) { > buffer_info = &tx_ring->buffer_info[i]; > skb = netdev_alloc_skb(adapter->netdev, bufsz); > + if (!skb) > + return NULL; > skb_reserve(skb, PCH_GBE_DMA_ALIGN); > buffer_info->skb = skb; > tx_desc = PCH_GBE_TX_DESC(*tx_ring, i); > -- > 1.9.1 > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/