diff options
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_fb.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_fb.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_fb.c b/drivers/gpu/drm/radeon/radeon_fb.c index e192acfbf0cd..dc1634bb0c11 100644 --- a/drivers/gpu/drm/radeon/radeon_fb.c +++ b/drivers/gpu/drm/radeon/radeon_fb.c | |||
@@ -363,6 +363,7 @@ int radeon_fbdev_init(struct radeon_device *rdev) | |||
363 | { | 363 | { |
364 | struct radeon_fbdev *rfbdev; | 364 | struct radeon_fbdev *rfbdev; |
365 | int bpp_sel = 32; | 365 | int bpp_sel = 32; |
366 | int ret; | ||
366 | 367 | ||
367 | /* select 8 bpp console on RN50 or 16MB cards */ | 368 | /* select 8 bpp console on RN50 or 16MB cards */ |
368 | if (ASIC_IS_RN50(rdev) || rdev->mc.real_vram_size <= (32*1024*1024)) | 369 | if (ASIC_IS_RN50(rdev) || rdev->mc.real_vram_size <= (32*1024*1024)) |
@@ -376,9 +377,14 @@ int radeon_fbdev_init(struct radeon_device *rdev) | |||
376 | rdev->mode_info.rfbdev = rfbdev; | 377 | rdev->mode_info.rfbdev = rfbdev; |
377 | rfbdev->helper.funcs = &radeon_fb_helper_funcs; | 378 | rfbdev->helper.funcs = &radeon_fb_helper_funcs; |
378 | 379 | ||
379 | drm_fb_helper_init(rdev->ddev, &rfbdev->helper, | 380 | ret = drm_fb_helper_init(rdev->ddev, &rfbdev->helper, |
380 | rdev->num_crtc, | 381 | rdev->num_crtc, |
381 | RADEONFB_CONN_LIMIT); | 382 | RADEONFB_CONN_LIMIT); |
383 | if (ret) { | ||
384 | kfree(rfbdev); | ||
385 | return ret; | ||
386 | } | ||
387 | |||
382 | drm_fb_helper_single_add_all_connectors(&rfbdev->helper); | 388 | drm_fb_helper_single_add_all_connectors(&rfbdev->helper); |
383 | drm_fb_helper_initial_config(&rfbdev->helper, bpp_sel); | 389 | drm_fb_helper_initial_config(&rfbdev->helper, bpp_sel); |
384 | return 0; | 390 | return 0; |