@@ -2503,13 +2503,13 @@ static int dvb_frontend_open(struct inode *inode, struct file *file)
if (ret) {
dev_err(fe->dvb->device,
"Tuner is busy. Error %d\n", ret);
- goto err1;
+ goto err2;
}
}
#endif
ret = dvb_frontend_start (fe);
if (ret)
- goto err2;
+ goto err3;
/* empty event queue */
fepriv->events.eventr = fepriv->events.eventw = 0;
@@ -2519,6 +2519,11 @@ static int dvb_frontend_open(struct inode *inode, struct file *file)
mutex_unlock (&adapter->mfe_lock);
return ret;
+err3:
+#ifdef CONFIG_MEDIA_CONTROLLER_DVB
+ if (fe->dvb->mdev && fe->dvb->mdev->disable_source)
+ fe->dvb->mdev->disable_source(dvbdev->entity);
+#endif
err2:
dvb_generic_release(inode, file);
err1:
When enable_source finds the tuner busy, do dvb_generic_release(). In addition, when dvb_frontend_start() fails, call disable_source to release tuner. Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com> --- drivers/media/dvb-core/dvb_frontend.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)