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: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:
Fabio Estevam 2018-11-06 05:16:03 -05:00 committed by Mauro Carvalho Chehab
parent c229f5c746
commit efceb765ff
1 changed files with 4 additions and 1 deletions

View File

@ -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);