All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Missing return check against Null for return value of netdev_alloc_dev_skb()
@ 2014-06-15  4:05 Nick
  2014-06-15  4:39 ` Nick Krause
  2014-06-15  6:53 ` David Miller
  0 siblings, 2 replies; 7+ messages in thread
From: Nick @ 2014-06-15  4:05 UTC (permalink / raw)
  To: davem
  Cc: andriy.shevchenko, dvhart, jeffrey.t.kirsher, ast, dborkman,
	bhutchings, netdev, linux-kernel

Signed-off-by: Nick <xerofoify@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


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-06-16 13:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-15  4:05 [PATCH] Missing return check against Null for return value of netdev_alloc_dev_skb() Nick
2014-06-15  4:39 ` Nick Krause
2014-06-15  6:53 ` David Miller
2014-06-15 20:27   ` Nick Krause
2014-06-16  2:26     ` David Miller
2014-06-16  3:28       ` Nick Krause
2014-06-16 13:32     ` Sergei Shtylyov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.