diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2015-02-05 11:00:42 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-02-06 23:50:12 +0300 |
commit | 37c85c3498c5538db050ff287e346127dbc16f7c (patch) | |
tree | 8c1bbc4e4009c703b1cf7a1a8d6fa0cec59df007 /lib/kfifo.c | |
parent | e8a308affcd79d95dad111f7872e43e9f73abb3b (diff) | |
download | linux-37c85c3498c5538db050ff287e346127dbc16f7c.tar.xz |
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 'lib/kfifo.c')
0 files changed, 0 insertions, 0 deletions