mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-16 14:46:43 +07:00
media: ov5645: Fix write_reg return code
I2C transfer functions return number of successful operations (on success). Do not return the received positive return code but instead return 0 on success. The users of write_reg function already use this logic. Signed-off-by: Todor Tomov <todor.tomov@linaro.org> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:
parent
ce96bcf5b4
commit
7064878073
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user