summaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c/ov5645.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/i2c/ov5645.c')
-rw-r--r--drivers/media/i2c/ov5645.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/media/i2c/ov5645.c b/drivers/media/i2c/ov5645.c
index 4e3142a7e5a7..b3f762578f7f 100644
--- a/drivers/media/i2c/ov5645.c
+++ b/drivers/media/i2c/ov5645.c
@@ -600,11 +600,13 @@ static int ov5645_write_reg(struct ov5645 *ov5645, u16 reg, u8 val)
regbuf[2] = val;
ret = i2c_master_send(ov5645->i2c_client, regbuf, 3);
- if (ret < 0)
+ if (ret < 0) {
dev_err(ov5645->dev, "%s: write reg error %d: reg=%x, val=%x\n",
__func__, ret, reg, val);
+ return ret;
+ }
- return ret;
+ return 0;
}
static int ov5645_read_reg(struct ov5645 *ov5645, u16 reg, u8 *val)
OpenPOWER on IntegriCloud