summaryrefslogtreecommitdiff
path: root/linux-core/drm_fb.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux-core/drm_fb.c')
-rw-r--r--linux-core/drm_fb.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/linux-core/drm_fb.c b/linux-core/drm_fb.c
index 5f2b1cea..7a105d59 100644
--- a/linux-core/drm_fb.c
+++ b/linux-core/drm_fb.c
@@ -299,9 +299,8 @@ int drmfb_probe(struct drm_device *dev, struct drm_crtc *crtc)
int ret;
info = framebuffer_alloc(sizeof(struct drmfb_par), device);
- if (!info){
- return -EINVAL;
- }
+ if (!info)
+ return -ENOMEM;
fb->fbdev = info;
@@ -408,8 +407,10 @@ int drmfb_probe(struct drm_device *dev, struct drm_crtc *crtc)
break;
}
- if (register_framebuffer(info) < 0)
+ if (register_framebuffer(info) < 0) {
+ unregister_framebuffer(info);
return -EINVAL;
+ }
printk(KERN_INFO "fb%d: %s frame buffer device\n", info->node,
info->fix.id);