diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2014-03-27 15:40:30 +0000 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2014-10-17 14:35:38 +0100 |
commit | bfba6f845998dfb17272e64fccd9b2e7e1d88d7b (patch) | |
tree | f894353cd24764e946775d1b739361a3113f6da8 /drivers/net/ethernet/nxp | |
parent | 4ac5dc6cea6751372633c231ba732ac969f8c9b3 (diff) |
net:fec: allocate descriptor rings at device open, and free on device close
The driver has had a memory leak for quite some time: when the device is
probed, we allocate a page for the descriptor rings, but we never free
this.
Rather than trying to free it on the various probe failure paths, move
its allocation to device open time - we have to restart the FEC for this
to take effect. This also means we can free the descriptor rings when
we clean up in the device close function, which gives this a nice
symmetry.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/net/ethernet/nxp')
0 files changed, 0 insertions, 0 deletions