korina: add error-handling to korina_alloc_ring
authorPhil Sutter <n0-1@freewrt.org>
Wed, 12 Aug 2009 12:52:32 +0000 (12:52 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 13 Aug 2009 23:26:12 +0000 (16:26 -0700)
This also avoids a potential buffer overflow in case the very first
receive descriptor fails to allocate, as an index of -1 would be used
afterwards. Kudos to Roel Kluin for pointing this out and providing an
initial patch.

Signed-off-by: Phil Sutter <n0-1@freewrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

No differences found