display: return -ENOTSUP if there is no brightness node 48/270748/2 submit/tizen/20220208.075544
authorYoungjae Cho <y0.cho@samsung.com>
Mon, 7 Feb 2022 04:11:34 +0000 (13:11 +0900)
committerYoungjae Cho <y0.cho@samsung.com>
Tue, 8 Feb 2022 08:06:58 +0000 (00:06 -0800)
Change-Id: Ic42e6ca43297dc8a7e7c9ad8547b0397039e7dd5
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
hw/display/display.c

index 1f1172617548cadae1e8a2466733080ad4e2982e..a3c4d546c165e8c77bfe008537879880a257abf1 100644 (file)
@@ -44,7 +44,7 @@ static int display_get_max_brightness(int *val)
        if (max < 0) {
                r = sys_get_int(BACKLIGHT_PATH"/max_brightness", &max);
                if (r < 0)
-                       return r;
+                       return -ENOTSUP;
        }
 
        *val = max;
@@ -63,7 +63,7 @@ static int display_get_brightness(int *brightness)
        r = sys_get_int(BACKLIGHT_PATH"/brightness", &v);
        if (r < 0) {
                _E("fail to get brightness (errno:%d)", r);
-               return r;
+               return -ENOTSUP;
        }
 
        *brightness = v;
@@ -77,7 +77,7 @@ static int display_set_brightness(int brightness)
        r = display_get_max_brightness(&max);
        if (r < 0) {
                _E("fail to get max brightness (errno:%d)", r);
-               return r;
+               return -ENOTSUP;
        }
 
        if (brightness < 0 || brightness > max) {