There is missing return value check from clk_prepare_enable(). Fix it by using devm_clk_get_enabled() macro. Fixes: df3305156f98 ("[media] v4l: xilinx: Add Xilinx Video IP core") Cc: stable@vger.kernel.org Signed-off-by: Michal Simek --- Changes in v2: - Add Fixed tag and CC stable Removing xvip_cleanup_resources() should be done separately on the top of this patch. --- drivers/media/platform/xilinx/xilinx-vip.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/media/platform/xilinx/xilinx-vip.c b/drivers/media/platform/xilinx/xilinx-vip.c index f1574edd2b43..537702ace760 100644 --- a/drivers/media/platform/xilinx/xilinx-vip.c +++ b/drivers/media/platform/xilinx/xilinx-vip.c @@ -212,18 +212,16 @@ int xvip_init_resources(struct xvip_device *xvip) if (IS_ERR(xvip->iomem)) return PTR_ERR(xvip->iomem); - xvip->clk = devm_clk_get(xvip->dev, NULL); + xvip->clk = devm_clk_get_enabled(xvip->dev, NULL); if (IS_ERR(xvip->clk)) return PTR_ERR(xvip->clk); - clk_prepare_enable(xvip->clk); return 0; } EXPORT_SYMBOL_GPL(xvip_init_resources); void xvip_cleanup_resources(struct xvip_device *xvip) { - clk_disable_unprepare(xvip->clk); } EXPORT_SYMBOL_GPL(xvip_cleanup_resources); --- base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4 branch: xnext/vip -- 2.43.0