summaryrefslogtreecommitdiff
path: root/drivers/media/dvb-frontends
diff options
context:
space:
mode:
authorYan Lei <yan_lei@dahuatech.com>2022-04-10 09:19:25 +0300
committerMauro Carvalho Chehab <mchehab@kernel.org>2022-11-25 13:00:45 +0300
commita15fe8d9f1bf460a804bcf18a890bfd2cf0d5caa (patch)
treeb78985c674549df55d1308b85a64c491bdc7b415 /drivers/media/dvb-frontends
parent6745ea4bdde9cab08149be4820540abe6a0f4207 (diff)
downloadlinux-a15fe8d9f1bf460a804bcf18a890bfd2cf0d5caa.tar.xz
media: dvb-frontends: fix leak of memory fw
Link: https://lore.kernel.org/linux-media/20220410061925.4107-1-chinayanlei2002@163.com Signed-off-by: Yan Lei <yan_lei@dahuatech.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/media/dvb-frontends')
-rw-r--r--drivers/media/dvb-frontends/bcm3510.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/dvb-frontends/bcm3510.c b/drivers/media/dvb-frontends/bcm3510.c
index da0ff7b44da4..68b92b4419cf 100644
--- a/drivers/media/dvb-frontends/bcm3510.c
+++ b/drivers/media/dvb-frontends/bcm3510.c
@@ -649,6 +649,7 @@ static int bcm3510_download_firmware(struct dvb_frontend* fe)
deb_info("firmware chunk, addr: 0x%04x, len: 0x%04x, total length: 0x%04zx\n",addr,len,fw->size);
if ((ret = bcm3510_write_ram(st,addr,&b[i+4],len)) < 0) {
err("firmware download failed: %d\n",ret);
+ release_firmware(fw);
return ret;
}
i += 4 + len;