Commit 7b993855 authored by Daniel Schultz's avatar Daniel Schultz Committed by Jyri Sarha

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: default avatarDaniel Schultz <d.schultz@phytec.de>
Reviewed-by: default avatarSean Paul <seanpaul@chromium.org>
Signed-off-by: default avatarJyri Sarha <jsarha@ti.com>
parent cf97ee19
...@@ -412,13 +412,13 @@ static int tilcdc_load(struct drm_device *dev, unsigned long flags) ...@@ -412,13 +412,13 @@ static int tilcdc_load(struct drm_device *dev, unsigned long flags)
fail_vblank_cleanup: fail_vblank_cleanup:
drm_vblank_cleanup(dev); drm_vblank_cleanup(dev);
fail_mode_config_cleanup:
drm_mode_config_cleanup(dev);
fail_component_cleanup: fail_component_cleanup:
if (priv->is_componentized) if (priv->is_componentized)
component_unbind_all(dev->dev, dev); component_unbind_all(dev->dev, dev);
fail_mode_config_cleanup:
drm_mode_config_cleanup(dev);
fail_external_cleanup: fail_external_cleanup:
tilcdc_remove_external_encoders(dev); tilcdc_remove_external_encoders(dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment