Add an error trace in ov5640_read_reg() in case of i2c_transfer()
failure.
Uniformize error traces using dev_err instead v4l2_err.
Signed-off-by: Hugues Fruchet <hugues.fruchet@st.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
ret = i2c_transfer(client->adapter, &msg, 1);
if (ret < 0) {
- v4l2_err(&sensor->sd, "%s: error: reg=%x, val=%x\n",
+ dev_err(&client->dev, "%s: error: reg=%x, val=%x\n",
__func__, reg, val);
return ret;
}
msg[1].len = 1;
ret = i2c_transfer(client->adapter, msg, 2);
- if (ret < 0)
+ if (ret < 0) {
+ dev_err(&client->dev, "%s: error: reg=%x\n",
+ __func__, reg);
return ret;
+ }
*val = buf[0];
return 0;