提交 efceb765 编写于 作者: F Fabio Estevam 提交者: Mauro Carvalho Chehab

media: imx-pxp: Check the return value from clk_prepare_enable()

clk_prepare_enable() may fail, so we should better check its return value
and propagate it in the case of error.
Signed-off-by: NFabio Estevam <festevam@gmail.com>
Reviewed-by: NPhilipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: NHans Verkuil <hansverk@cisco.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
上级 c229f5c7
......@@ -1666,7 +1666,10 @@ static int pxp_probe(struct platform_device *pdev)
return ret;
}
clk_prepare_enable(dev->clk);
ret = clk_prepare_enable(dev->clk);
if (ret < 0)
return ret;
pxp_soft_reset(dev);
spin_lock_init(&dev->irqlock);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册