553541c453
[ Upstream commit 83ba7e895debc529803a7a258653f2fe9bf3bf40 ]
A struct device can never be devm_alloc()'ed.
Here, it is embedded in "struct fsi_master", and "struct fsi_master" is
embedded in "struct fsi_master_aspeed".
Since "struct device" is embedded, the data structure embedding it must be
released with the release function, as is already done here.
So use kzalloc() instead of devm_kzalloc() when allocating "aspeed" and
update all error handling branches accordingly.
This prevent a potential double free().
This also fix another issue if opb_readl() fails. Instead of a direct
return, it now jumps in the error handling path.
Fixes:
|
||
---|---|---|
.. | ||
cf-fsi-fw.h | ||
fsi-core.c | ||
fsi-master-aspeed.c | ||
fsi-master-ast-cf.c | ||
fsi-master-gpio.c | ||
fsi-master-hub.c | ||
fsi-master.h | ||
fsi-occ.c | ||
fsi-sbefifo.c | ||
fsi-scom.c | ||
Kconfig | ||
Makefile |