From: phucduc.bui@gmail.com
To: Sakari Ailus <sakari.ailus@linux.intel.com>,
Shunqian Zheng <zhengsq@rock-chips.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Walter Werner Schneider <contact@schnwalter.eu>,
Dave Stevenson <dave.stevenson@raspberrypi.com>,
Jacopo Mondi <jacopo@jmondi.org>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Luca Weiss <luca@lucaweiss.eu>,
Hans Verkuil <hverkuil@kernel.org>,
Roman Kovalivskyi <roman.kovalivskyi@globallogic.com>,
bui duc phuc <phucduc.bui@gmail.com>
Subject: [PATCH 1/3] media: i2c: ov2685: propagate reset GPIO errors
Date: Wed, 7 Oct 2026 17:49:37 +0700 [thread overview]
Message-ID: <20261007104940.507820-2-phucduc.bui@gmail.com> (raw)
In-Reply-To: <20261007104940.507820-1-phucduc.bui@gmail.com>
From: bui duc phuc <phucduc.bui@gmail.com>
devm_gpiod_get_optional() may return -EPROBE_DEFER or other errors,
but ov2685_probe() currently converts them all to -EINVAL.
Use dev_err_probe() to propagate the original error from the reset GPIO
lookup.
Fixes: 0482fbb1c1cc ("media: i2c: ov2685: Make reset gpio optional")
Fixes: e3861d9118c8 ("media: ov2685: add support for OV2685 sensor")
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
drivers/media/i2c/ov2685.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/media/i2c/ov2685.c b/drivers/media/i2c/ov2685.c
index 4911a4eea126..92d0f90b3d37 100644
--- a/drivers/media/i2c/ov2685.c
+++ b/drivers/media/i2c/ov2685.c
@@ -793,10 +793,9 @@ static int ov2685_probe(struct i2c_client *client)
dev_warn(dev, "xvclk mismatched, modes are based on 24MHz\n");
ov2685->reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW);
- if (IS_ERR(ov2685->reset_gpio)) {
- dev_err(dev, "Failed to get reset-gpios\n");
- return -EINVAL;
- }
+ if (IS_ERR(ov2685->reset_gpio))
+ return dev_err_probe(dev, PTR_ERR(ov2685->reset_gpio),
+ "Failed to get reset-gpios\n");
ret = ov2685_configure_regulators(ov2685);
if (ret) {
--
2.43.0
next prev parent reply other threads:[~2026-10-07 10:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-07 10:49 [PATCH 0/3] media: i2c: propagate " phucduc.bui
2026-10-07 10:49 ` phucduc.bui [this message]
2026-10-07 10:49 ` [PATCH 2/3] media: i2c: ov2732: " phucduc.bui
2026-10-07 10:49 ` [PATCH 3/3] media: i2c: ov5647: propagate pwdn " phucduc.bui
2026-10-07 11:07 ` Dave Stevenson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261007104940.507820-2-phucduc.bui@gmail.com \
--to=phucduc.bui@gmail.com \
--cc=contact@schnwalter.eu \
--cc=dave.stevenson@raspberrypi.com \
--cc=hverkuil@kernel.org \
--cc=jacopo@jmondi.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=luca@lucaweiss.eu \
--cc=mchehab@kernel.org \
--cc=roman.kovalivskyi@globallogic.com \
--cc=sakari.ailus@linux.intel.com \
--cc=zhengsq@rock-chips.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®