build/patch/kernel/archive/sunxi-6.5/patches.megous/media-ov5640-Improve-error-reporting.patch

44 lines
1.2 KiB
Diff
Raw Normal View History

From 5936f84a5db634449a5fa14f5deab832a26a01f1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Fri, 22 Oct 2021 19:52:49 +0200
Subject: [PATCH 045/464] media: ov5640: Improve error reporting
Some probe errors are currently not reported. Report them properly.
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
drivers/media/i2c/ov5640.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c
index ffd836e2b94e..fc885e350e9a 100644
--- a/drivers/media/i2c/ov5640.c
+++ b/drivers/media/i2c/ov5640.c
@@ -3915,8 +3915,10 @@ static int ov5640_probe(struct i2c_client *client)
return ret;
ret = ov5640_get_regulators(sensor);
- if (ret)
+ if (ret) {
+ dev_err_probe(dev, ret, "Failed to get regulators\n");
goto entity_cleanup;
+ }
mutex_init(&sensor->lock);
@@ -3925,8 +3927,10 @@ static int ov5640_probe(struct i2c_client *client)
goto entity_cleanup;
ret = v4l2_async_register_subdev_sensor(&sensor->sd);
- if (ret)
+ if (ret) {
+ dev_err_probe(dev, ret, "Failed to register sensor\n");
goto err_controls;
+ }
pm_runtime_enable(dev);
pm_runtime_set_autosuspend_delay(dev, 1000);
--
2.34.1