Skip to content

Commit

Permalink
media: imx-pxp: Check the return value from clk_prepare_enable()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Fabio Estevam authored and Mauro Carvalho Chehab committed Nov 23, 2018
1 parent c229f5c commit efceb76
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/media/platform/imx-pxp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit efceb76

Please sign in to comment.