20b98e3c49
[ Upstream commit f6cc4b6a3ae53df425771000e9c9540cce9b7bb1 ]
In fjes_hw_setup, it allocates several memory and delay the deallocation
to the fjes_hw_exit in fjes_probe through the following call chain:
fjes_probe
|-> fjes_hw_init
|-> fjes_hw_setup
|-> fjes_hw_exit
However, when fjes_hw_setup fails, fjes_hw_exit won't be called and thus
all the resources allocated in fjes_hw_setup will be leaked. In this
patch, we free those resources in fjes_hw_setup and prevents such leaks.
Fixes:
|
||
---|---|---|
.. | ||
Makefile | ||
fjes.h | ||
fjes_debugfs.c | ||
fjes_ethtool.c | ||
fjes_hw.c | ||
fjes_hw.h | ||
fjes_main.c | ||
fjes_regs.h | ||
fjes_trace.c | ||
fjes_trace.h |