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 3/3] media: i2c: ov5647: propagate pwdn GPIO errors
Date: Wed, 7 Oct 2026 17:49:39 +0700 [thread overview]
Message-ID: <20261007104940.507820-4-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 ov5647_probe() currently converts them to -EINVAL.
Use dev_err_probe() to propagate the original error from the pwdn GPIO
lookup.
Fixes: b050791d287a ("media: ov5647: Add support for PWDN GPIO.")
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
drivers/media/i2c/ov5647.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/media/i2c/ov5647.c b/drivers/media/i2c/ov5647.c
index 3facf92b3841..b3049761a5fb 100644
--- a/drivers/media/i2c/ov5647.c
+++ b/drivers/media/i2c/ov5647.c
@@ -1186,10 +1186,9 @@ static int ov5647_probe(struct i2c_client *client)
/* Request the power down GPIO asserted. */
sensor->pwdn = devm_gpiod_get_optional(dev, "pwdn", GPIOD_OUT_HIGH);
- if (IS_ERR(sensor->pwdn)) {
- dev_err(dev, "Failed to get 'pwdn' gpio\n");
- return -EINVAL;
- }
+ if (IS_ERR(sensor->pwdn))
+ return dev_err_probe(dev, PTR_ERR(sensor->pwdn),
+ "Failed to get 'pwdn' gpio\n");
ret = ov5647_configure_regulators(dev, sensor);
if (ret)
--
2.43.0
next prev parent reply other threads:[~2026-10-07 10:50 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 GPIO errors phucduc.bui
2026-10-07 10:49 ` [PATCH 1/3] media: i2c: ov2685: propagate reset " phucduc.bui
2026-10-07 10:49 ` [PATCH 2/3] media: i2c: ov2732: propagate " phucduc.bui
2026-10-07 10:49 ` phucduc.bui [this message]
2026-10-07 11:07 ` [PATCH 3/3] media: i2c: ov5647: propagate pwdn " 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-4-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.