aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/bochs
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2014-12-19 05:21:32 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-01-21 08:57:03 -0500
commit01934c2a691882185b3021d437df13bcba07711d (patch)
tree6e891d192b0e4bd35b4f00ee013ea9763d5dc48d /drivers/gpu/drm/bochs
parent7119ad5f6b0ce222072b0c0b31c3b4ac87660afa (diff)
drm/fb-helper: Propagate errors from initial config failure
Make drm_fb_helper_initial_config() return an int rather than a bool so that the error can be properly propagated. While at it, update drivers to propagate errors further rather than just ignore them. v2: - cirrus: No cleanup is required, the top-level cirrus_driver_load() will do it as part of cirrus_driver_unload() in its cleanup path. Reported-by: Fengguang Wu <fengguang.wu@intel.com> Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Cc: Rob Clark <robdclark@gmail.com> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Christian König <christian.koenig@amd.com> Cc: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Thierry Reding <treding@nvidia.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Reviewed-by: Christian König <christian.koenig@amd.com> [danvet: Squash in simplification patch from kbuild.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/bochs')
-rw-r--r--drivers/gpu/drm/bochs/bochs_fbdev.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/gpu/drm/bochs/bochs_fbdev.c b/drivers/gpu/drm/bochs/bochs_fbdev.c
index 61dbf09dff5d..976d9798dc99 100644
--- a/drivers/gpu/drm/bochs/bochs_fbdev.c
+++ b/drivers/gpu/drm/bochs/bochs_fbdev.c
@@ -207,12 +207,22 @@ int bochs_fbdev_init(struct bochs_device *bochs)
207 if (ret) 207 if (ret)
208 return ret; 208 return ret;
209 209
210 drm_fb_helper_single_add_all_connectors(&bochs->fb.helper); 210 ret = drm_fb_helper_single_add_all_connectors(&bochs->fb.helper);
211 if (ret)
212 goto fini;
213
211 drm_helper_disable_unused_functions(bochs->dev); 214 drm_helper_disable_unused_functions(bochs->dev);
212 drm_fb_helper_initial_config(&bochs->fb.helper, 32); 215
216 ret = drm_fb_helper_initial_config(&bochs->fb.helper, 32);
217 if (ret)
218 goto fini;
213 219
214 bochs->fb.initialized = true; 220 bochs->fb.initialized = true;
215 return 0; 221 return 0;
222
223fini:
224 drm_fb_helper_fini(&bochs->fb.helper);
225 return ret;
216} 226}
217 227
218void bochs_fbdev_fini(struct bochs_device *bochs) 228void bochs_fbdev_fini(struct bochs_device *bochs)