Commit d40ec6fd authored by Shuah Khan's avatar Shuah Khan Committed by 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: default avatarShuah Khan <shuahkh@osg.samsung.com>
Acked-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment