Re: [Freedreno] [patch v2] drm/msm/dsi: free first element on error

2017-02-26 Thread Daniel Vetter
On Thu, Feb 16, 2017 at 02:27:08PM +0200, Jani Nikula wrote: > On Thu, 16 Feb 2017, Rob Clark wrote: > > On Thu, Feb 16, 2017 at 7:00 AM, Dan Carpenter > > wrote: > >> We're off by one here. We free something that wasn't allocated and we > >> don't free msm_host->bus_clks[]. > >> > >> Fixes: 6e

Re: [Freedreno] [PATCH v2] drm/msm/dsi: Fix the releasing of resources in error path in 'dsi_bus_clk_enable()'

2017-02-26 Thread Rob Clark
On Sun, Feb 26, 2017 at 7:10 AM, Christophe JAILLET wrote: > If a 'clk_prepare_enable()' fails, then we need to disable_unprepare the > clk already handled. > > With the current implemenatation, we try to do that on the clk that has > triggered the error, which is a no-op and leave msm_host->bus_c

Re: [Freedreno] [PATCH v2] drm/msm/dsi: Fix the releasing of resources in error path in 'dsi_bus_clk_enable()'

2017-02-26 Thread walter harms
looks good to me. Reviewed-by: wha...@bfs.de Am 26.02.2017 13:10, schrieb Christophe JAILLET: > If a 'clk_prepare_enable()' fails, then we need to disable_unprepare the > clk already handled. > > With the current implemenatation, we try to do that on the clk that has > triggered the error, which

Re: [Freedreno] [PATCH] drm/msm/dsi: Fix the releasing of resources in error path in 'dsi_bus_clk_enable()'

2017-02-26 Thread Rob Clark
On Sun, Feb 26, 2017 at 2:52 AM, Christophe JAILLET wrote: > If a 'clk_prepare_enable()' fails, then we need to disable_unprepare the > clk already handled. > > With the current implemenatation, we try to do that on the clk that has > triggered the error, which is a no-op, and leave 'msm_host->bus

[Freedreno] [PATCH v2] drm/msm/dsi: Fix the releasing of resources in error path in 'dsi_bus_clk_enable()'

2017-02-26 Thread Christophe JAILLET
If a 'clk_prepare_enable()' fails, then we need to disable_unprepare the clk already handled. With the current implemenatation, we try to do that on the clk that has triggered the error, which is a no-op and leave msm_host->bus_clks[0] untouched. Count forward in order to fix it and be more futur

[Freedreno] [PATCH] drm/msm/dsi: Fix the releasing of resources in error path in 'dsi_bus_clk_enable()'

2017-02-26 Thread Christophe JAILLET
If a 'clk_prepare_enable()' fails, then we need to disable_unprepare the clk already handled. With the current implemenatation, we try to do that on the clk that has triggered the error, which is a no-op, and leave 'msm_host->bus_clks[0]' untouched. Shift by one the index array to free resources

Re: [Freedreno] [PATCH] drm/msm/dsi: Fix the releasing of resources in error path in 'dsi_bus_clk_enable()'

2017-02-26 Thread walter harms
Am 26.02.2017 08:52, schrieb Christophe JAILLET: > If a 'clk_prepare_enable()' fails, then we need to disable_unprepare the > clk already handled. > > With the current implemenatation, we try to do that on the clk that has > triggered the error, which is a no-op, and leave 'msm_host->bus_clks[0]