diff --git a/drivers/gpu/drm/cirrus/cirrus_fbdev.c b/drivers/gpu/drm/cirrus/cirrus_fbdev.c index 0682210b068b..f7e8c6530beb 100644 --- a/drivers/gpu/drm/cirrus/cirrus_fbdev.c +++ b/drivers/gpu/drm/cirrus/cirrus_fbdev.c @@ -318,26 +318,20 @@ int cirrus_fbdev_init(struct cirrus_device *cdev) ret = drm_fb_helper_init(cdev->dev, &gfbdev->helper, cdev->num_crtc, CIRRUSFB_CONN_LIMIT); if (ret) - goto free; + return ret; ret = drm_fb_helper_single_add_all_connectors(&gfbdev->helper); if (ret) - goto fini; + return ret; /* disable all the possible outputs/crtcs before entering KMS mode */ drm_helper_disable_unused_functions(cdev->dev); ret = drm_fb_helper_initial_config(&gfbdev->helper, bpp_sel); if (ret) - goto fini; + return ret;; return 0; - -free: - kfree(gfbdev); -fini: - drm_fb_helper_fini(&gfbdev->helper); - return ret; } void cirrus_fbdev_fini(struct cirrus_device *cdev)