summaryrefslogtreecommitdiff
path: root/drivers/media/tuners/si2157.c
diff options
context:
space:
mode:
authorErnst Martin Witte <emw-linux-kernel@nocabal.de>2016-01-09 23:18:43 +0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2016-02-01 14:41:38 +0300
commit01d1d714e26624bc50ba95c49cf6e15bb215c150 (patch)
tree3284fad1a1149b814a51afd90a05dba0d1b1af2f /drivers/media/tuners/si2157.c
parent4bdcaa054e1c73697b390c32c434d96836121306 (diff)
downloadlinux-01d1d714e26624bc50ba95c49cf6e15bb215c150.tar.xz
[media] si2157: cancel_delayed_work_sync before device removal / kfree
si2157_remove was calling kfree(dev) with possibly still active schedule_delayed_work(dev->stat_work). This caused kernel panics in call_timer_fn e.g. after rmmod cx23885. Signed-off-by: Ernst Martin Witte <emw-linux-kernel@nocabal.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/tuners/si2157.c')
-rw-r--r--drivers/media/tuners/si2157.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/tuners/si2157.c b/drivers/media/tuners/si2157.c
index 5da5b421d310..3450dfb7c427 100644
--- a/drivers/media/tuners/si2157.c
+++ b/drivers/media/tuners/si2157.c
@@ -458,6 +458,9 @@ static int si2157_remove(struct i2c_client *client)
dev_dbg(&client->dev, "\n");
+ /* stop statistics polling */
+ cancel_delayed_work_sync(&dev->stat_work);
+
memset(&fe->ops.tuner_ops, 0, sizeof(struct dvb_tuner_ops));
fe->tuner_priv = NULL;
kfree(dev);