mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH] video/stm: fix return value handling for of_get_display_timings()
Date: Wed,  4 Sep 2019 13:18:51 +0200	[thread overview]
Message-ID: <20190904111851.13317-1-u.kleine-koenig@pengutronix.de> (raw)

of_get_display_timings() returns NULL on failure, not an error pointer.

Fixes: 16fd24847d7a ("video: stmfb: Add device tree support")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/video/stm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/video/stm.c b/drivers/video/stm.c
index 0c190d36ae9f..d4a618fe5091 100644
--- a/drivers/video/stm.c
+++ b/drivers/video/stm.c
@@ -551,9 +551,9 @@ static int stmfb_probe(struct device_d *hw_dev)
 		}
 
 		modes = of_get_display_timings(display);
-		if (IS_ERR(modes)) {
+		if (!modes) {
 			dev_err(hw_dev, "unable to parse display timings\n");
-			return PTR_ERR(modes);
+			return -EINVAL;
 		}
 
 		fbi.info.modes.modes = modes->modes;
-- 
2.23.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

             reply	other threads:[~2019-09-04 11:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-04 11:18 Uwe Kleine-König [this message]
2019-09-06  7:13 ` Sascha Hauer

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=20190904111851.13317-1-u.kleine-koenig@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=barebox@lists.infradead.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