Commit c3d14780 authored by Fabio Estevam's avatar Fabio Estevam Committed by Mauro Carvalho Chehab

[media] ov2640: 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 <fabio.estevam@nxp.com>
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 877f1af1
...@@ -1108,7 +1108,9 @@ static int ov2640_probe(struct i2c_client *client, ...@@ -1108,7 +1108,9 @@ static int ov2640_probe(struct i2c_client *client,
priv->clk = devm_clk_get(&client->dev, "xvclk"); priv->clk = devm_clk_get(&client->dev, "xvclk");
if (IS_ERR(priv->clk)) if (IS_ERR(priv->clk))
return PTR_ERR(priv->clk); return PTR_ERR(priv->clk);
clk_prepare_enable(priv->clk); ret = clk_prepare_enable(priv->clk);
if (ret)
return ret;
} }
ret = ov2640_probe_dt(client, priv); ret = ov2640_probe_dt(client, priv);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment