@@ -686,7 +686,10 @@
}
fepriv->thread = NULL;
- fepriv->exit = 0;
+ if (kthread_should_stop())
+ fepriv->exit = 2;
+ else
+ fepriv->exit = 0;
mb();
dvb_frontend_wakeup(fe);
@@ -1929,6 +1932,8 @@
int ret;
dprintk ("%s\n", __func__);
+ if (fepriv->exit == 2)
+ return -ENODEV;
if (adapter->mfe_shared) {
mutex_lock (&adapter->mfe_lock);
@@ -2021,7 +2026,7 @@
ret = dvb_generic_release (inode, file);
if (dvbdev->users == -1) {
- if (fepriv->exit == 1) {
+ if (fepriv->exit) {
fops_put(file->f_op);
file->f_op = NULL;
wake_up(&dvbdev->wait_queue);