All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] atm: dereference of he_dev->rbps_virt in he_init_group()
@ 2009-08-29 18:56 Roel Kluin
  2009-08-29 18:59 ` Roel Kluin
  0 siblings, 1 reply; 14+ messages in thread
From: Roel Kluin @ 2009-08-29 18:56 UTC (permalink / raw)
  To: Chas Williams, linux-atm-general, netdev, Andrew Morton

he_dev->rbps_virt allocation may fail.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
diff --git a/drivers/atm/he.c b/drivers/atm/he.c
index 2de6406..2d766d6 100644
--- a/drivers/atm/he.c
+++ b/drivers/atm/he.c
@@ -795,6 +795,8 @@ he_init_group(struct he_dev *he_dev, int group)
 	}
 	memset(he_dev->rbps_base, 0, CONFIG_RBPS_SIZE * sizeof(struct he_rbp));
 	he_dev->rbps_virt = kmalloc(CONFIG_RBPS_SIZE * sizeof(struct he_virt), GFP_KERNEL);
+	if (he_dev->rbps_virt == NULL)
+		return -ENOMEM;
 
 	for (i = 0; i < CONFIG_RBPS_SIZE; ++i) {
 		dma_addr_t dma_handle;

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

end of thread, other threads:[~2009-09-28 19:45 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-29 18:56 [PATCH] atm: dereference of he_dev->rbps_virt in he_init_group() Roel Kluin
2009-08-29 18:59 ` Roel Kluin
2009-09-03  6:25   ` David Miller
2009-09-05 12:35     ` Roel Kluin
2009-09-11 19:37       ` David Miller
2009-09-11 19:51         ` David Miller
2009-09-19 18:16           ` Roel Kluin
2009-09-19 18:27             ` Joe Perches
2009-09-20 17:11               ` Roel Kluin
2009-09-22 21:25                 ` David Miller
2009-09-26 13:20                   ` Roel Kluin
2009-09-27  3:26                     ` David Miller
2009-09-28  8:58                       ` Roel Kluin
2009-09-28 19:46                         ` David Miller

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.