Message ID | 20230104093921.2570431-1-yangyingliang@huawei.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | media: imx: imx7-media-csi: fix missing clk_disable_unprepare() in imx7_csi_init() | expand |
Hi Yang, Thank you for the patch. On Wed, Jan 04, 2023 at 05:39:21PM +0800, Yang Yingliang wrote: > Add missing clk_disable_unprepare(), if imx7_csi_dma_setup() fails > in imx7_csi_init(). > > Fixes: ff43ca911978 ("media: imx: imx7-media-csi: Move CSI configuration before source start") > Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > --- > drivers/media/platform/nxp/imx7-media-csi.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/media/platform/nxp/imx7-media-csi.c b/drivers/media/platform/nxp/imx7-media-csi.c > index 886374d3a6ff..1ef92c8c0098 100644 > --- a/drivers/media/platform/nxp/imx7-media-csi.c > +++ b/drivers/media/platform/nxp/imx7-media-csi.c > @@ -638,8 +638,10 @@ static int imx7_csi_init(struct imx7_csi *csi) > imx7_csi_configure(csi); > > ret = imx7_csi_dma_setup(csi); > - if (ret < 0) > + if (ret < 0) { > + clk_disable_unprepare(csi->mclk); > return ret; > + } > > return 0; > }
Hey Yingliang, Yang Yingliang <yangyingliang@huawei.com> writes: > Add missing clk_disable_unprepare(), if imx7_csi_dma_setup() fails > in imx7_csi_init(). > > Fixes: ff43ca911978 ("media: imx: imx7-media-csi: Move CSI configuration before source start") > Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> LGTM, Many thanks. Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com> Cheers, Rui > --- > drivers/media/platform/nxp/imx7-media-csi.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/media/platform/nxp/imx7-media-csi.c b/drivers/media/platform/nxp/imx7-media-csi.c > index 886374d3a6ff..1ef92c8c0098 100644 > --- a/drivers/media/platform/nxp/imx7-media-csi.c > +++ b/drivers/media/platform/nxp/imx7-media-csi.c > @@ -638,8 +638,10 @@ static int imx7_csi_init(struct imx7_csi *csi) > imx7_csi_configure(csi); > > ret = imx7_csi_dma_setup(csi); > - if (ret < 0) > + if (ret < 0) { > + clk_disable_unprepare(csi->mclk); > return ret; > + } > > return 0; > } > -- > 2.25.1
diff --git a/drivers/media/platform/nxp/imx7-media-csi.c b/drivers/media/platform/nxp/imx7-media-csi.c index 886374d3a6ff..1ef92c8c0098 100644 --- a/drivers/media/platform/nxp/imx7-media-csi.c +++ b/drivers/media/platform/nxp/imx7-media-csi.c @@ -638,8 +638,10 @@ static int imx7_csi_init(struct imx7_csi *csi) imx7_csi_configure(csi); ret = imx7_csi_dma_setup(csi); - if (ret < 0) + if (ret < 0) { + clk_disable_unprepare(csi->mclk); return ret; + } return 0; }
Add missing clk_disable_unprepare(), if imx7_csi_dma_setup() fails in imx7_csi_init(). Fixes: ff43ca911978 ("media: imx: imx7-media-csi: Move CSI configuration before source start") Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> --- drivers/media/platform/nxp/imx7-media-csi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)