]> Git Repo - linux.git/commit
drm: rcar-du: Simplify and fix probe error handling
authorLaurent Pinchart <[email protected]>
Tue, 18 Oct 2016 21:51:35 +0000 (00:51 +0300)
committerLaurent Pinchart <[email protected]>
Mon, 14 Nov 2016 23:44:47 +0000 (01:44 +0200)
commit4f7b0d263833928e947e172eff2d2997179c5cb9
tree8cb33779ca7f519b36a328f494efda065d2a5321
parent05ee29e94acf0d4b3998c3f93374952de8f90176
drm: rcar-du: Simplify and fix probe error handling

It isn't safe to call drm_dev_unregister() without first initializing
mode setting with drm_mode_config_init(). This leads to a crash if
either IO memory can't be remapped or vblank initialization fails.

Fix this by reordering the initialization sequence. Move vblank
initialization after the drm_mode_config_init() call, and move IO
remapping before drm_dev_alloc() to avoid the need to perform clean up
in case of failure.

While at it remove the explicit drm_vblank_cleanup() call from
rcar_du_remove() as the drm_dev_unregister() function already cleans up
vblank.

Signed-off-by: Laurent Pinchart <[email protected]>
drivers/gpu/drm/rcar-du/rcar_du_drv.c
drivers/gpu/drm/rcar-du/rcar_du_kms.c
This page took 0.055643 seconds and 4 git commands to generate.