diff options
author | Shuah Khan | 2016-01-27 21:49:33 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab | 2016-02-01 13:21:33 -0200 |
commit | d40ec6fdb0b03b7be4c7923a3da0e46bf943740a (patch) | |
tree | 18320de634e257ebeb0320ed9f3075cbeef38e9c /drivers | |
parent | 7c8fe516bd81d991feb73ccd969ec29850af3013 (diff) |
[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')
-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; } } |