Skip to content

Commit

Permalink
drm/rockchip: dw-mipi-dsi: Fix connector and encoder cleanup.
Browse files Browse the repository at this point in the history
In bind()'s error handling path call destroy functions instead of
cleanup functions for encoder and connector and reorder to match how is
called in bind().

In unbind() call the connector and encoder destroy functions.

Signed-off-by: Jeffy Chen <[email protected]>
Signed-off-by: Thierry Escande <[email protected]>
Signed-off-by: Enric Balletbo i Serra <[email protected]>
Signed-off-by: Heiko Stuebner <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
  • Loading branch information
JeffyCN authored and mmind committed Mar 8, 2018
1 parent 9aecbc4 commit e45df26
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions drivers/gpu/drm/rockchip/dw-mipi-dsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1302,8 +1302,8 @@ static int dw_mipi_dsi_bind(struct device *dev, struct device *master,
err_mipi_dsi_host:
mipi_dsi_host_unregister(&dsi->dsi_host);
err_cleanup:
drm_encoder_cleanup(&dsi->encoder);
drm_connector_cleanup(&dsi->connector);
dsi->connector.funcs->destroy(&dsi->connector);
dsi->encoder.funcs->destroy(&dsi->encoder);
err_pllref:
clk_disable_unprepare(dsi->pllref_clk);
return ret;
Expand All @@ -1316,6 +1316,10 @@ static void dw_mipi_dsi_unbind(struct device *dev, struct device *master,

mipi_dsi_host_unregister(&dsi->dsi_host);
pm_runtime_disable(dev);

dsi->connector.funcs->destroy(&dsi->connector);
dsi->encoder.funcs->destroy(&dsi->encoder);

clk_disable_unprepare(dsi->pllref_clk);
}

Expand Down

0 comments on commit e45df26

Please sign in to comment.