[PATCH] video/stm: fix return value handling for of_get_display_timings()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
 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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux