提交 d40ec6fd 编写于 作者: S Shuah Khan 提交者: Mauro Carvalho Chehab

[media] media: Fix media_open() to clear filp->private_data in error leg

Fix media_open() to clear filp->private_data when file open
fails.
Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
Acked-by: NSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
上级 7c8fe516
......@@ -181,6 +181,7 @@ static int media_open(struct inode *inode, struct file *filp)
ret = mdev->fops->open(filp);
if (ret) {
put_device(&mdev->dev);
filp->private_data = NULL;
return ret;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册