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

44 lines
1.1 KiB
Diff

From acae2e551a0c1b4b9e4376e7a0c45ebdd9deec64 Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megous@megous.com>
Date: Fri, 22 Oct 2021 19:52:49 +0200
Subject: [PATCH 164/478] media: i2c: ov5640: Improve error reporting
Some probe errors are currently not reported. Report them properly.
Signed-off-by: Ondrej Jirman <megous@megous.com>
---
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 d693ab938893..924a1f867923 100644
--- a/drivers/media/i2c/ov5640.c
+++ b/drivers/media/i2c/ov5640.c
@@ -3159,8 +3159,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");
return ret;
+ }
mutex_init(&sensor->lock);
@@ -3169,8 +3171,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 free_ctrls;
+ }
return 0;
--
2.35.3