diff options
author | Daniel Schultz <[email protected]> | 2016-09-23 12:52:49 +0200 |
---|---|---|
committer | Jyri Sarha <[email protected]> | 2016-09-23 15:12:57 +0300 |
commit | 7b993855dfd5d87e07ac84285d3d9bb0c743dede (patch) | |
tree | d6e4534562fdaee5e6e147f898a88f81a443b405 | |
parent | cf97ee19629363d5847a4af135cf415f76d7388c (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 <[email protected]>
Reviewed-by: Sean Paul <[email protected]>
Signed-off-by: Jyri Sarha <[email protected]>
-rw-r--r-- | drivers/gpu/drm/tilcdc/tilcdc_drv.c | 6 |
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: fail_vblank_cleanup: drm_vblank_cleanup(dev); -fail_mode_config_cleanup: - drm_mode_config_cleanup(dev); - fail_component_cleanup: if (priv->is_componentized) component_unbind_all(dev->dev, dev); +fail_mode_config_cleanup: + drm_mode_config_cleanup(dev); + fail_external_cleanup: tilcdc_remove_external_encoders(dev); |