aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViorel Suman <[email protected]>2020-11-24 16:19:57 +0200
committerMark Brown <[email protected]>2020-11-25 12:54:43 +0000
commit373c2cebf42772434c8dd0deffc3b3886ea8f1eb (patch)
treeeb565f639807f5e10cde7c9bb1ac711c253c39b7
parent5b10b62989219aa527ee4fa555d1995a3b70981b (diff)
ASoC: fsl_xcvr: fix potential resource leak
"fw" variable must be relased before return. Signed-off-by: Viorel Suman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
-rw-r--r--sound/soc/fsl/fsl_xcvr.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/soc/fsl/fsl_xcvr.c b/sound/soc/fsl/fsl_xcvr.c
index 2a28810d0e29..3d58c88ea603 100644
--- a/sound/soc/fsl/fsl_xcvr.c
+++ b/sound/soc/fsl/fsl_xcvr.c
@@ -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;
}