getDisplayAttributes now returns an error code
authorJesse Hall <jessehall@google.com>
Thu, 20 Sep 2012 18:43:49 +0000 (11:43 -0700)
committerJesse Hall <jessehall@google.com>
Thu, 20 Sep 2012 18:43:49 +0000 (11:43 -0700)
Change-Id: I79d2d38cc74fa5c4b3cc7d0538cef1c6d7f3e484

libhwc/hwc.cpp

index 6c080c1c81f9427d6e99288051ef92cd6a715954..48d9e3d9e6b48e37ad20f24f39b45a8678cea424 100644 (file)
@@ -1689,7 +1689,7 @@ static int32_t exynos5_hdmi_attribute(struct exynos5_hwc_composer_device_1_t *pd
     }
 }
 
-static void exynos5_getDisplayAttributes(struct hwc_composer_device_1 *dev,
+static int exynos5_getDisplayAttributes(struct hwc_composer_device_1 *dev,
         int disp, uint32_t config, const uint32_t *attributes, int32_t *values)
 {
     struct exynos5_hwc_composer_device_1_t *pdev =
@@ -1700,9 +1700,13 @@ static void exynos5_getDisplayAttributes(struct hwc_composer_device_1 *dev,
             values[i] = exynos5_fimd_attribute(pdev, attributes[i]);
         else if (disp == HWC_DISPLAY_EXTERNAL)
             values[i] = exynos5_hdmi_attribute(pdev, attributes[i]);
-        else
+        else {
             ALOGE("unknown display type %u", disp);
+            return -EINVAL;
+        }
     }
+
+    return 0;
 }
 
 static int exynos5_close(hw_device_t* device);