[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201124141957.20481-1-viorel.suman@oss.nxp.com>
Date: Tue, 24 Nov 2020 16:19:57 +0200
From: "Viorel Suman (OSS)" <viorel.suman@....nxp.com>
To: Timur Tabi <timur@...nel.org>,
Nicolin Chen <nicoleotsuka@...il.com>,
Xiubo Li <Xiubo.Lee@...il.com>,
Fabio Estevam <festevam@...il.com>,
Shengjiu Wang <shengjiu.wang@...il.com>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>, alsa-devel@...a-project.org,
linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org
Cc: Viorel Suman <viorel.suman@....com>
Subject: [PATCH] ASoC: fsl_xcvr: fix potential resource leak
From: Viorel Suman <viorel.suman@....com>
"fw" variable must be relased before return.
Signed-off-by: Viorel Suman <viorel.suman@....com>
---
sound/soc/fsl/fsl_xcvr.c | 1 +
1 file changed, 1 insertion(+)
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;
}
--
2.26.2
Powered by blists - more mailing lists