[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1453938573-13093-1-git-send-email-shuahkh@osg.samsung.com>
Date: Wed, 27 Jan 2016 16:49:33 -0700
From: Shuah Khan <shuahkh@....samsung.com>
To: mchehab@....samsung.com
Cc: Shuah Khan <shuahkh@....samsung.com>, linux-media@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] 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@....samsung.com>
---
drivers/media/media-devnode.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/media/media-devnode.c b/drivers/media/media-devnode.c
index cea35bf..29409f4 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;
}
}
--
2.5.0
Powered by blists - more mailing lists