summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuca Weiss <luca@z3ntu.xyz>2023-02-01 18:06:59 +0100
committerMauro Carvalho Chehab <mchehab@kernel.org>2023-03-20 15:57:07 +0100
commit74b506cb4fa7bffb18c51837c237bbb0758ecc5e (patch)
treedecd23e1ca799ab7ddb2954bae82c0b64ef61fc5
parentef586f262c1c86c3a1a649a6419dc2e0ac1136d1 (diff)
downloadlinux-stable-74b506cb4fa7bffb18c51837c237bbb0758ecc5e.tar.gz
linux-stable-74b506cb4fa7bffb18c51837c237bbb0758ecc5e.tar.bz2
linux-stable-74b506cb4fa7bffb18c51837c237bbb0758ecc5e.zip
media: i2c: ov2685: Add print for power on write failed
If the sensor doens't power up correctly, for example due to incorrect devicetree description, the power up i2c writes will fail. Add an error print for this situation. Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Luca Weiss <luca@z3ntu.xyz> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
-rw-r--r--drivers/media/i2c/ov2685.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/i2c/ov2685.c b/drivers/media/i2c/ov2685.c
index 1c80b121e7d6..0eb41a63787e 100644
--- a/drivers/media/i2c/ov2685.c
+++ b/drivers/media/i2c/ov2685.c
@@ -419,8 +419,10 @@ static int __ov2685_power_on(struct ov2685 *ov2685)
* writing register before .s_stream() as a workaround
*/
ret = ov2685_write_array(ov2685->client, ov2685->cur_mode->reg_list);
- if (ret)
+ if (ret) {
+ dev_err(dev, "Failed to set regs for power on\n");
goto disable_supplies;
+ }
return 0;