diff options
author | Dave Airlie <airlied@redhat.com> | 2014-03-20 13:20:00 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2014-03-20 13:20:00 +1000 |
commit | 004e5cf743086990e5fc04a14437b3966d7fa9a2 (patch) | |
tree | 50ab1e0ae805209d68d3005e819ddbf29297ec3d | |
parent | 55ae26b7953f0de851559b155800cd3b6f433164 (diff) | |
parent | 85d898bf8f638b7a23af95dc7d32b4a72c178637 (diff) | |
download | linux-004e5cf743086990e5fc04a14437b3966d7fa9a2.tar.bz2 |
Merge branch 'exynos-drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-fixes
Just fixed resource release issue at open fail.
* 'exynos-drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos:
drm/exynos: Fix (more) freeing issues in exynos_drm_drv.c
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_drv.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c index 215131ab1dd2..c204b4e3356e 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_drv.c +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c @@ -172,20 +172,24 @@ static int exynos_drm_open(struct drm_device *dev, struct drm_file *file) ret = exynos_drm_subdrv_open(dev, file); if (ret) - goto out; + goto err_file_priv_free; anon_filp = anon_inode_getfile("exynos_gem", &exynos_drm_gem_fops, NULL, 0); if (IS_ERR(anon_filp)) { ret = PTR_ERR(anon_filp); - goto out; + goto err_subdrv_close; } anon_filp->f_mode = FMODE_READ | FMODE_WRITE; file_priv->anon_filp = anon_filp; return ret; -out: + +err_subdrv_close: + exynos_drm_subdrv_close(dev, file); + +err_file_priv_free: kfree(file_priv); file->driver_priv = NULL; return ret; |