mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] video: tc358767: set num_modes=0 if no valid mode found
@ 2018-03-23 17:12 Andrey Gusakov
  2018-03-26  7:25 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Andrey Gusakov @ 2018-03-23 17:12 UTC (permalink / raw)
  To: barebox; +Cc: andrey.gusakov, cphealy

Since commit f986661 "video: ipu: register framebuffer,
even when no modes are found" value returned from
VPL_GET_VIDEOMODES ioctl is ignored. So set valid num_modes
in error case to avoid crash in register_framebuffer.

Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com>
---
 drivers/video/tc358767.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/video/tc358767.c b/drivers/video/tc358767.c
index 5ad5cb4..d4749b1 100644
--- a/drivers/video/tc358767.c
+++ b/drivers/video/tc358767.c
@@ -1258,6 +1258,7 @@ static int tc_filter_videomodes(struct tc_data *tc, struct display_timings *timi
 	} while (1);
 
 	free(timings->modes);
+	timings->num_modes = 0;
 	timings->modes = NULL;
 
 	if (!num_modes) {
-- 
1.9.1


_______________________________________________
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:[~2018-03-26  7:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-23 17:12 [PATCH] video: tc358767: set num_modes=0 if no valid mode found Andrey Gusakov
2018-03-26  7:25 ` Sascha Hauer

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