summaryrefslogtreecommitdiff
path: root/drivers/media/i2c
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@nxp.com>2017-07-18 23:34:18 -0400
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-08-08 06:24:33 -0400
commit011dfab80543019d01f66665734f50f5a4b26e6d (patch)
treedc3ddcf41c13fd44649a41a198f3ee7a87bc43b8 /drivers/media/i2c
parenteada47597b97abe956570ea47120df8833f64574 (diff)
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>
Diffstat (limited to 'drivers/media/i2c')
-rw-r--r--drivers/media/i2c/ov7670.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/i2c/ov7670.c b/drivers/media/i2c/ov7670.c
index 7270c68ed18a..552a881e24da 100644
--- a/drivers/media/i2c/ov7670.c
+++ b/drivers/media/i2c/ov7670.c
@@ -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);