diff options
author | Shuah Khan <shuahkh@osg.samsung.com> | 2016-01-28 00:49:33 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2016-02-01 16:21:33 +0100 |
commit | d40ec6fdb0b03b7be4c7923a3da0e46bf943740a (patch) | |
tree | 18320de634e257ebeb0320ed9f3075cbeef38e9c /drivers/media/media-devnode.c | |
parent | [media] v4l: remove MEDIA_TUNER dependency for VIDEO_TUNER (diff) | |
download | linux-d40ec6fdb0b03b7be4c7923a3da0e46bf943740a.tar.xz linux-d40ec6fdb0b03b7be4c7923a3da0e46bf943740a.zip |
[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>
Diffstat (limited to 'drivers/media/media-devnode.c')
-rw-r--r-- | drivers/media/media-devnode.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/media-devnode.c b/drivers/media/media-devnode.c index cea35bf20011..29409f440f1c 100644 --- a/drivers/media/media-devnode.c +++ b/drivers/media/media-devnode.c @@ -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; } } |