mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] video/stm: fix return value handling for of_get_display_timings()
@ 2019-09-04 11:18 Uwe Kleine-König
  2019-09-06  7:13 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Uwe Kleine-König @ 2019-09-04 11:18 UTC (permalink / raw)
  To: barebox

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] video/stm: fix return value handling for of_get_display_timings()
  2019-09-04 11:18 [PATCH] video/stm: fix return value handling for of_get_display_timings() Uwe Kleine-König
@ 2019-09-06  7:13 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2019-09-06  7:13 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: barebox

On Wed, Sep 04, 2019 at 01:18:51PM +0200, Uwe Kleine-König wrote:
> 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(-)

Applied, thanks

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-09-06  7:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-04 11:18 [PATCH] video/stm: fix return value handling for of_get_display_timings() Uwe Kleine-König
2019-09-06  7:13 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox