diff options
author | Ernst Martin Witte <emw-linux-kernel@nocabal.de> | 2016-01-09 21:18:43 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2016-02-01 12:41:38 +0100 |
commit | 01d1d714e26624bc50ba95c49cf6e15bb215c150 (patch) | |
tree | 3284fad1a1149b814a51afd90a05dba0d1b1af2f /drivers/media/tuners/si2157.c | |
parent | [media] af9033: cancel_delayed_work_sync before device removal / kfree (diff) | |
download | linux-01d1d714e26624bc50ba95c49cf6e15bb215c150.tar.xz linux-01d1d714e26624bc50ba95c49cf6e15bb215c150.zip |
[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.c | 3 |
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); |