diff options
Diffstat (limited to 'drivers/gpu/drm/tegra/dsi.c')
-rw-r--r-- | drivers/gpu/drm/tegra/dsi.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/gpu/drm/tegra/dsi.c b/drivers/gpu/drm/tegra/dsi.c index 50d46ae3786b..44e102799195 100644 --- a/drivers/gpu/drm/tegra/dsi.c +++ b/drivers/gpu/drm/tegra/dsi.c @@ -745,14 +745,13 @@ static void tegra_dsi_soft_reset(struct tegra_dsi *dsi) static void tegra_dsi_connector_reset(struct drm_connector *connector) { - struct tegra_dsi_state *state; - - kfree(connector->state); - connector->state = NULL; + struct tegra_dsi_state *state = + kzalloc(sizeof(*state), GFP_KERNEL); - state = kzalloc(sizeof(*state), GFP_KERNEL); - if (state) - connector->state = &state->base; + if (state) { + kfree(connector->state); + __drm_atomic_helper_connector_reset(connector, &state->base); + } } static struct drm_connector_state * |