google_charger: clear rc for update adapter information in time

rc == 0 is one of condition to update adapter information to google_battery, clear rc to 0 after it gets update_interval successfully.

Bug: 233568388
Signed-off-by: Jenny Ho <hsiufangho@google.com>
Change-Id: I5a88dec188d6b62a29fc7535ce0c18e4e229cbc6
(cherry picked from commit a1e45b002f611f35be23bc5c373cc6b5e3911727)
diff --git a/google_charger.c b/google_charger.c
index 69f46c2..aa968f1 100644
--- a/google_charger.c
+++ b/google_charger.c
@@ -2299,9 +2299,12 @@
 		goto rerun_error;
 
 	update_interval = rc;
-	if (update_interval >= 0)
+	if (update_interval >= 0) {
 		chg_done = (chg_drv->chg_state.f.flags &
 			    GBMS_CS_FLAG_DONE) != 0;
+		/* clear rc for exit_chg_work: update correct data */
+		rc = 0;
+	}
 
 	/*
 	 * chg_drv->disable_pwrsrc -> chg_drv->disable_charging