tdm: check error of get_subpixel 80/163880/1
authorSangjin Lee <lsj119@samsung.com>
Thu, 14 Dec 2017 01:10:46 +0000 (10:10 +0900)
committerSangjin Lee <lsj119@samsung.com>
Thu, 14 Dec 2017 01:10:46 +0000 (10:10 +0900)
Change-Id: I07ffe58a782058f2b5954a816fe1311f10a5a518

src/lib/tdm/tdm-output.c

index 6c86c3c..70d187e 100644 (file)
@@ -361,8 +361,11 @@ pepper_tdm_output_get_subpixel_order(void *o)
 {
        pepper_tdm_output_t *output = (pepper_tdm_output_t *)o;
        unsigned int subpixel;
+       tdm_error ret;
+
+       ret = tdm_output_get_subpixel(output->output, &subpixel);
+       PEPPER_CHECK(ret == TDM_ERROR_NONE, return WL_OUTPUT_SUBPIXEL_UNKNOWN, "faile get subpixel\n");
 
-       tdm_output_get_subpixel(output->output, &subpixel);
        switch (subpixel) {
        default:
                subpixel = WL_OUTPUT_SUBPIXEL_UNKNOWN;