Message ID | 1453938573-13093-1-git-send-email-shuahkh@osg.samsung.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Wed, Jan 27, 2016 at 04:49:33PM -0700, Shuah Khan wrote: > 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>
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; } }
Fix media_open() to clear filp->private_data when file open fails. Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com> --- drivers/media/media-devnode.c | 1 + 1 file changed, 1 insertion(+)