mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 00:34:20 +08:00
ASoC: fsl_xcvr: fix potential resource leak
"fw" variable must be relased before return. Signed-off-by: Viorel Suman <viorel.suman@nxp.com> Link: https://lore.kernel.org/r/20201124141957.20481-1-viorel.suman@oss.nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
5b10b62989
commit
373c2cebf4
@ -706,6 +706,7 @@ static int fsl_xcvr_load_firmware(struct fsl_xcvr *xcvr)
|
||||
/* RAM is 20KiB = 16KiB code + 4KiB data => max 10 pages 2KiB each */
|
||||
if (rem > 16384) {
|
||||
dev_err(dev, "FW size %d is bigger than 16KiB.\n", rem);
|
||||
release_firmware(fw);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user