diff options
Diffstat (limited to 'linux-core/drm_fb.c')
-rw-r--r-- | linux-core/drm_fb.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/linux-core/drm_fb.c b/linux-core/drm_fb.c index 1531e96c..775fd180 100644 --- a/linux-core/drm_fb.c +++ b/linux-core/drm_fb.c @@ -300,9 +300,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; @@ -409,8 +408,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); |