diff options
author | Giuseppe CAVALLARO <peppe.cavallaro@st.com> | 2015-12-04 07:21:06 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-12-05 17:49:11 -0500 |
commit | ae79a639bb3dfd168dc8c1e5d6dfc471bdf6f284 (patch) | |
tree | 61d4a0322654b612d11a9ea0d39b20820ee1090a /drivers/base/platform.c | |
parent | b17c1d9a52b8b931e2f1019fda5d34ece621c5fd (diff) | |
download | linux-ae79a639bb3dfd168dc8c1e5d6dfc471bdf6f284.tar.gz linux-ae79a639bb3dfd168dc8c1e5d6dfc471bdf6f284.tar.bz2 linux-ae79a639bb3dfd168dc8c1e5d6dfc471bdf6f284.zip |
stmmac: fix resource management when resume
There is a memleak when suspend/resume this driver version.
Currently the stmmac, during resume step, reallocates all the resources
but they are not released when suspend.
The patch is not to release these resources but the logic has been changed.
In fact, it is not necessary to free and reallocate all from scratch
because the memory data will be always preserved.
As final solution, the patch just reinit the descriptors and the rx/tx
pointers only when resume. Tested done on STi boxes.
Reported-by: ZhengShunQian <zhengsq@rock-chips.com>
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/base/platform.c')
0 files changed, 0 insertions, 0 deletions