Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 357969
b: refs/heads/master
c: 58c0dca
h: refs/heads/master
i:
  357967: 5f73b74
v: v3
  • Loading branch information
Daniel Vetter committed Jan 20, 2013
1 parent 3078c09 commit 9f7943a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 468174f748603497e73dba9b5c6d1d9f71121486
refs/heads/master: 58c0dca10614117cf4b385e3314e79e3b37fa66b
15 changes: 5 additions & 10 deletions trunk/drivers/gpu/drm/drm_crtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2542,19 +2542,14 @@ int drm_mode_getfb(struct drm_device *dev,
{
struct drm_mode_fb_cmd *r = data;
struct drm_framebuffer *fb;
int ret = 0;
int ret;

if (!drm_core_check_feature(dev, DRIVER_MODESET))
return -EINVAL;

drm_modeset_lock_all(dev);
fb = drm_framebuffer_lookup(dev, r->fb_id);
if (!fb) {
ret = -EINVAL;
goto out;
}
/* fb is protect by the mode_config lock, so drop the ref immediately */
drm_framebuffer_unreference(fb);
if (!fb)
return -EINVAL;

r->height = fb->height;
r->width = fb->width;
Expand All @@ -2566,8 +2561,8 @@ int drm_mode_getfb(struct drm_device *dev,
else
ret = -ENODEV;

out:
drm_modeset_unlock_all(dev);
drm_framebuffer_unreference(fb);

return ret;
}

Expand Down

0 comments on commit 9f7943a

Please sign in to comment.