diff options
-rw-r--r-- | healthd/healthd_mode_charger.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/healthd/healthd_mode_charger.cpp b/healthd/healthd_mode_charger.cpp index 0e3a092..3328154 100644 --- a/healthd/healthd_mode_charger.cpp +++ b/healthd/healthd_mode_charger.cpp @@ -221,7 +221,7 @@ static int set_tricolor_led(int on, int color) fd = open(leds[i].path, O_RDWR); if (fd < 0) { LOGE("Could not open red led node\n"); - goto cleanup; + continue; } if (on) snprintf(buffer, sizeof(int), "%d\n", 255); @@ -230,7 +230,6 @@ static int set_tricolor_led(int on, int color) if (write(fd, buffer, strlen(buffer)) < 0) LOGE("Could not write to led node\n"); -cleanup: if (fd >= 0) close(fd); } |