Commit efceb765 authored by Fabio Estevam's avatar Fabio Estevam Committed by Mauro Carvalho Chehab
Browse files

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: default avatarFabio Estevam <festevam@gmail.com>
Reviewed-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: default avatarHans Verkuil <hansverk@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent c229f5c7
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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);