From: Fabio Estevam Date: Tue, 6 Nov 2018 10:16:03 +0000 (-0500) Subject: media: imx-pxp: Check the return value from clk_prepare_enable() X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=efceb765ff1df6d0ce0d024de5fe66bd7bb241da;p=openwrt%2Fstaging%2Fblogic.git 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 Reviewed-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/platform/imx-pxp.c b/drivers/media/platform/imx-pxp.c index b76cd0e8313c..27780f174c44 100644 --- a/drivers/media/platform/imx-pxp.c +++ b/drivers/media/platform/imx-pxp.c @@ -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);