summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Clark <rob@ti.com>2012-07-23 11:35:06 -0500
committerRob Clark <rob@ti.com>2012-07-23 11:35:06 -0500
commitebd7904877d08525beb5039e4ea2f5b6c0a7c23f (patch)
tree9c7894f3443a0ed1eb0dc7e6ab6dcdbf9ce4c972
parentdb004badef9315ba6a5f165d0974dd5afd5a6178 (diff)
modetest: fix uninitialized fourcc
If color format for CRTC layer is not specified on commandline, then c->fourcc is unintialized resulting in addfb call failing. Signed-off-by: Rob Clark <rob@ti.com>
-rw-r--r--tests/modetest/modetest.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c
index 3e74008e..e0fd66ca 100644
--- a/tests/modetest/modetest.c
+++ b/tests/modetest/modetest.c
@@ -867,12 +867,12 @@ static int parse_connector(struct connector *c, const char *arg)
if (*p == '@') {
strncpy(c->format_str, p + 1, 4);
c->format_str[4] = '\0';
+ }
- c->fourcc = format_fourcc(p + 1);
- if (c->fourcc == 0) {
- fprintf(stderr, "unknown format %s\n", c->format_str);
- return -1;
- }
+ c->fourcc = format_fourcc(c->format_str);
+ if (c->fourcc == 0) {
+ fprintf(stderr, "unknown format %s\n", c->format_str);
+ return -1;
}
return 0;