aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2015-02-05 11:00:42 +0300
committerDavid S. Miller <davem@davemloft.net>2015-02-06 12:50:12 -0800
commit37c85c3498c5538db050ff287e346127dbc16f7c (patch)
tree8c1bbc4e4009c703b1cf7a1a8d6fa0cec59df007 /net
parentARCNET: Add missing error check for devm_kzalloc (diff)
downloadlinux-dev-37c85c3498c5538db050ff287e346127dbc16f7c.tar.xz
linux-dev-37c85c3498c5538db050ff287e346127dbc16f7c.zip
net: sxgbe: fix error handling in init_rx_ring()
There are a couple bugs with the error handling in this function. 1) If we can't allocate "rx_ring->rx_skbuff" then we should call dma_free_coherent() but we don't. 2) free_rx_ring() frees "rx_ring->rx_skbuff_dma" and "rx_ring->rx_skbuff" so calling it in a loop causes a double free. Also it was a bit confusing how we sometimes freed things before doing the goto. I've cleaned it up so it does error handling in normal kernel style. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions