aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Schultz <d.schultz@phytec.de>2016-09-23 06:52:49 -0400
committerJyri Sarha <jsarha@ti.com>2016-09-23 08:12:57 -0400
commit7b993855dfd5d87e07ac84285d3d9bb0c743dede (patch)
treed6e4534562fdaee5e6e147f898a88f81a443b405
parentcf97ee19629363d5847a4af135cf415f76d7388c (diff)
drm/tilcdc: fix wrong error handling
When 'component_bind_all' fails it should not try to unbind components in the error handling. This will produce a null pointer kernel panic when no component exist. This patch changes the order of the error handling. Now, it will only unbind components if the are bound. Otherwise, the module will jump to an error label below. Signed-off-by: Daniel Schultz <d.schultz@phytec.de> Reviewed-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Jyri Sarha <jsarha@ti.com>
-rw-r--r--drivers/gpu/drm/tilcdc/tilcdc_drv.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
index 4b93cab91168..a694977c32f4 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
@@ -412,13 +412,13 @@ fail_irq_uninstall:
412fail_vblank_cleanup: 412fail_vblank_cleanup:
413 drm_vblank_cleanup(dev); 413 drm_vblank_cleanup(dev);
414 414
415fail_mode_config_cleanup:
416 drm_mode_config_cleanup(dev);
417
418fail_component_cleanup: 415fail_component_cleanup:
419 if (priv->is_componentized) 416 if (priv->is_componentized)
420 component_unbind_all(dev->dev, dev); 417 component_unbind_all(dev->dev, dev);
421 418
419fail_mode_config_cleanup:
420 drm_mode_config_cleanup(dev);
421
422fail_external_cleanup: 422fail_external_cleanup:
423 tilcdc_remove_external_encoders(dev); 423 tilcdc_remove_external_encoders(dev);
424 424