diff options
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_fb.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_fb.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_fb.c b/drivers/gpu/drm/radeon/radeon_fb.c index 29b9220ec399..3000bc4c136b 100644 --- a/drivers/gpu/drm/radeon/radeon_fb.c +++ b/drivers/gpu/drm/radeon/radeon_fb.c | |||
@@ -390,18 +390,27 @@ int radeon_fbdev_init(struct radeon_device *rdev) | |||
390 | ret = drm_fb_helper_init(rdev->ddev, &rfbdev->helper, | 390 | ret = drm_fb_helper_init(rdev->ddev, &rfbdev->helper, |
391 | rdev->num_crtc, | 391 | rdev->num_crtc, |
392 | RADEONFB_CONN_LIMIT); | 392 | RADEONFB_CONN_LIMIT); |
393 | if (ret) { | 393 | if (ret) |
394 | kfree(rfbdev); | 394 | goto free; |
395 | return ret; | ||
396 | } | ||
397 | 395 | ||
398 | drm_fb_helper_single_add_all_connectors(&rfbdev->helper); | 396 | ret = drm_fb_helper_single_add_all_connectors(&rfbdev->helper); |
397 | if (ret) | ||
398 | goto fini; | ||
399 | 399 | ||
400 | /* disable all the possible outputs/crtcs before entering KMS mode */ | 400 | /* disable all the possible outputs/crtcs before entering KMS mode */ |
401 | drm_helper_disable_unused_functions(rdev->ddev); | 401 | drm_helper_disable_unused_functions(rdev->ddev); |
402 | 402 | ||
403 | drm_fb_helper_initial_config(&rfbdev->helper, bpp_sel); | 403 | ret = drm_fb_helper_initial_config(&rfbdev->helper, bpp_sel); |
404 | if (ret) | ||
405 | goto fini; | ||
406 | |||
404 | return 0; | 407 | return 0; |
408 | |||
409 | fini: | ||
410 | drm_fb_helper_fini(&rfbdev->helper); | ||
411 | free: | ||
412 | kfree(rfbdev); | ||
413 | return ret; | ||
405 | } | 414 | } |
406 | 415 | ||
407 | void radeon_fbdev_fini(struct radeon_device *rdev) | 416 | void radeon_fbdev_fini(struct radeon_device *rdev) |