Unverified Commit 373c2ceb authored by Viorel Suman's avatar Viorel Suman Committed by Mark Brown
Browse files

ASoC: fsl_xcvr: fix potential resource leak



"fw" variable must be relased before return.

Signed-off-by: default avatarViorel Suman <viorel.suman@nxp.com>
Link: https://lore.kernel.org/r/20201124141957.20481-1-viorel.suman@oss.nxp.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 5b10b629
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;
	}