media: Fix media_open() to clear filp->private_data in error leg
commit d40ec6fdb0b03b7be4c7923a3da0e46bf943740a upstream. 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> Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
69767f70a2
commit
7451beed43
1 changed files with 1 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue