From: Dan Carpenter <dan.carpenter@linaro.org>
To: Cai Huoqing <cai.huoqing@linux.dev>
Cc: Helge Deller <deller@gmx.de>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: [PATCH] fbdev: omapfb: panel-tpo-td043mtea1: fix error code in probe()
Date: Mon, 15 May 2023 13:32:47 +0300 [thread overview]
Message-ID: <6f80089a-9223-4434-8da1-c071dd9367b5@kili.mountain> (raw)
This was using the wrong variable, "r", instead of "ddata->vcc_reg", so
it returned success instead of a negative error code.
Fixes: 0d3dbeb8142a ("video: fbdev: omapfb: panel-tpo-td043mtea1: Make use of the helper function dev_err_probe()")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
.../video/fbdev/omap2/omapfb/displays/panel-tpo-td043mtea1.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td043mtea1.c b/drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td043mtea1.c
index 1eaa35c27835..477789cff8e0 100644
--- a/drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td043mtea1.c
+++ b/drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td043mtea1.c
@@ -491,7 +491,8 @@ static int tpo_td043_probe(struct spi_device *spi)
ddata->vcc_reg = devm_regulator_get(&spi->dev, "vcc");
if (IS_ERR(ddata->vcc_reg)) {
- r = dev_err_probe(&spi->dev, r, "failed to get LCD VCC regulator\n");
+ r = dev_err_probe(&spi->dev, PTR_ERR(ddata->vcc_reg),
+ "failed to get LCD VCC regulator\n");
goto err_regulator;
}
--
2.39.2
next reply other threads:[~2023-05-15 10:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-15 10:32 Dan Carpenter [this message]
2023-05-19 14:12 ` [PATCH] fbdev: omapfb: panel-tpo-td043mtea1: fix error code in probe() Helge Deller
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=6f80089a-9223-4434-8da1-c071dd9367b5@kili.mountain \
--to=dan.carpenter@linaro.org \
--cc=cai.huoqing@linux.dev \
--cc=deller@gmx.de \
--cc=dmitry.torokhov@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-omap@vger.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;
as well as URLs for NNTP newsgroup(s).