summaryrefslogtreecommitdiff
path: root/drivers/media/usb/dvb-usb/pctv452e.c
diff options
context:
space:
mode:
authorWolfgang Rohdewald <wolfgang@rohdewald.de>2017-11-28 06:33:52 -0500
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-12-13 08:40:47 -0500
commit6cdeaed3b1420bd2569891be0c4123ff59628e9e (patch)
tree7e881cd8ab88f2c2792e11bce9cc1690649ed52c /drivers/media/usb/dvb-usb/pctv452e.c
parentb1728ff617f88a1f7a5d8c8f21fe17a2f6af5d16 (diff)
media: dvb_usb_pctv452e: module refcount changes were unbalanced
dvb_frontend will call dvb_detach for: - stb0899_detach in dvb_frontend_release and - stb0899_release in __dvb_frontend_free But we only do dvb_attach(stb0899_attach). Increment the module refcount instead. Signed-off-by: Wolfgang Rohdewald <wolfgang@rohdewald.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/usb/dvb-usb/pctv452e.c')
-rw-r--r--drivers/media/usb/dvb-usb/pctv452e.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/media/usb/dvb-usb/pctv452e.c b/drivers/media/usb/dvb-usb/pctv452e.c
index 601ade7ca48d..3b7f8298b24d 100644
--- a/drivers/media/usb/dvb-usb/pctv452e.c
+++ b/drivers/media/usb/dvb-usb/pctv452e.c
@@ -913,6 +913,14 @@ static int pctv452e_frontend_attach(struct dvb_usb_adapter *a)
&a->dev->i2c_adap);
if (!a->fe_adap[0].fe)
return -ENODEV;
+
+ /*
+ * dvb_frontend will call dvb_detach for both stb0899_detach
+ * and stb0899_release but we only do dvb_attach(stb0899_attach).
+ * Increment the module refcount instead.
+ */
+ symbol_get(stb0899_attach);
+
if ((dvb_attach(lnbp22_attach, a->fe_adap[0].fe,
&a->dev->i2c_adap)) == NULL)
err("Cannot attach lnbp22\n");