From: Chuhong Yuan <hslester96@gmail.com>
To: unlisted-recipients:; (no To-header on input)
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
Chuhong Yuan <hslester96@gmail.com>
Subject: [PATCH] media: omap3isp: fix the incorrect check in omap3isp_csiphy_acquire
Date: Thu, 19 Dec 2019 15:48:56 +0800 [thread overview]
Message-ID: <20191219074856.15104-1-hslester96@gmail.com> (raw)
The check in omap3isp_csiphy_acquire() does not check for ERR_PTR.
Besides, sometimes vdd can be optional and therefore NULL.
Revise the check to fix this issue.
Fixes: 121e9f1c4c49 ("[media] omap3isp: CCP2/CSI2 receivers")
Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
---
drivers/media/platform/omap3isp/ispcsiphy.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/media/platform/omap3isp/ispcsiphy.c b/drivers/media/platform/omap3isp/ispcsiphy.c
index 6dc7359c5131..4f46d99a4228 100644
--- a/drivers/media/platform/omap3isp/ispcsiphy.c
+++ b/drivers/media/platform/omap3isp/ispcsiphy.c
@@ -261,10 +261,10 @@ int omap3isp_csiphy_acquire(struct isp_csiphy *phy, struct media_entity *entity)
{
int rval;
- if (phy->vdd == NULL) {
+ if (IS_ERR(phy->vdd)) {
dev_err(phy->isp->dev,
"Power regulator for CSI PHY not available\n");
- return -ENODEV;
+ return PTR_ERR(phy->vdd);
}
mutex_lock(&phy->mutex);
--
2.24.0
reply other threads:[~2019-12-19 7:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20191219074856.15104-1-hslester96@gmail.com \
--to=hslester96@gmail.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
/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®