media: ov7670: Return the real error code

When devm_clk_get() fails the real error code should be propagated,
instead of always returning -EPROBE_DEFER.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:
Fabio Estevam 2017-07-18 23:34:18 -04:00 committed by Mauro Carvalho Chehab
parent eada47597b
commit 011dfab805
1 changed files with 1 additions and 1 deletions

View File

@ -1614,7 +1614,7 @@ static int ov7670_probe(struct i2c_client *client,
info->clk = devm_clk_get(&client->dev, "xclk");
if (IS_ERR(info->clk))
return -EPROBE_DEFER;
return PTR_ERR(info->clk);
clk_prepare_enable(info->clk);
ret = ov7670_init_gpio(client, info);