mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-13 00:29:50 +00:00
[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: Shuah Khan <shuahkh@osg.samsung.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
This commit is contained in:
parent
7c8fe516bd
commit
d40ec6fdb0
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user