summaryrefslogtreecommitdiff
path: root/drivers/media/media-devnode.c
diff options
context:
space:
mode:
authorShuah Khan <shuahkh@osg.samsung.com>2016-01-28 02:49:33 +0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2016-02-01 18:21:33 +0300
commitd40ec6fdb0b03b7be4c7923a3da0e46bf943740a (patch)
tree18320de634e257ebeb0320ed9f3075cbeef38e9c /drivers/media/media-devnode.c
parent7c8fe516bd81d991feb73ccd969ec29850af3013 (diff)
downloadlinux-d40ec6fdb0b03b7be4c7923a3da0e46bf943740a.tar.xz
[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.c1
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;
}
}