summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorDaniel Scheller <d.scheller@gmx.net>2017-12-17 10:40:43 -0500
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-12-19 07:16:23 -0500
commitfac37bb124c221bde55ae77fbf8c7eff84881bda (patch)
tree578f9146a2f7519a3a4541ca0b9bf45e542c137d /drivers/media
parenta1c484b3a09bda3d2a0c3c1f38691a625e4d016a (diff)
media: ddbridge: fix resources cleanup for CI hardware
Do kfree() on port->en->data instead of port->en. port->en only holds a ptr to a struct dvb_ca_en50221, which is a member either of a memalloc'ed struct ddb_ci (DuoFlex CI, Octopus CI Duo) or a struct cxd (CXD2099AR based Single Flex, allocated by the cxd2099 driver). port->en.data though holds the ptr to the allocated memory, which must rather be kfree()'d. Change this accordingly. Cc: Ralph Metzler <rjkm@metzlerbros.de> Signed-off-by: Daniel Scheller <d.scheller@gmx.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/pci/ddbridge/ddbridge-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/pci/ddbridge/ddbridge-core.c b/drivers/media/pci/ddbridge/ddbridge-core.c
index eda004398316..a81125d492ff 100644
--- a/drivers/media/pci/ddbridge/ddbridge-core.c
+++ b/drivers/media/pci/ddbridge/ddbridge-core.c
@@ -1990,7 +1990,7 @@ void ddb_ports_detach(struct ddb *dev)
dvb_unregister_device(port->dvb[0].dev);
if (port->en) {
dvb_ca_en50221_release(port->en);
- kfree(port->en);
+ kfree(port->en->data);
port->en = NULL;
}
break;