|
|
|
@ -68,6 +68,7 @@ static long backlight_get(struct backlight *backlight, char *node) |
|
|
|
|
value = strtol(buffer, NULL, 10); |
|
|
|
|
ret = value; |
|
|
|
|
out: |
|
|
|
|
if (fd >= 0) |
|
|
|
|
close(fd); |
|
|
|
|
free(path); |
|
|
|
|
return ret; |
|
|
|
@ -124,9 +125,9 @@ long backlight_set_brightness(struct backlight *backlight, long brightness) |
|
|
|
|
ret = backlight_get_brightness(backlight); |
|
|
|
|
backlight->brightness = ret; |
|
|
|
|
out: |
|
|
|
|
if (buffer) |
|
|
|
|
free(buffer); |
|
|
|
|
free(path); |
|
|
|
|
if (fd >= 0) |
|
|
|
|
close(fd); |
|
|
|
|
return ret; |
|
|
|
|
} |
|
|
|
|