]> git.baikalelectronics.ru Git - kernel.git/commit
bgmac: don't update slot on skb alloc/dma mapping error
authorNathan Hintz <nlhintz@hotmail.com>
Wed, 30 Oct 2013 02:32:01 +0000 (19:32 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 30 Oct 2013 02:59:19 +0000 (22:59 -0400)
commitcdd3966ffb28f924f8fed6abc8f2dbb15dfd8220
tree9d5eea9809b64db417adbb5b4d375b1b6722f128
parentccc105fed7e344840df97eba8bd21d09de8202ef
bgmac: don't update slot on skb alloc/dma mapping error

Don't update the slot in "bgmac_dma_rx_skb_for_slot" unless both the
skb alloc and dma mapping are successful; and free the newly allocated
skb if a dma mapping error occurs.  This relieves the caller of the need
to deduce/execute the appropriate cleanup action required when an error
occurs.

Signed-off-by: Nathan Hintz <nlhintz@hotmail.com>
Acked-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bgmac.c