Merge android13-gs-pixel-5.10-tm-qpr2 into android13-gs-pixel-5.10-tm-qpr3

SBMerger: 478053055
Change-Id: Ibf80737c230550d0136ceb94cc520dfcded70d0a
Signed-off-by: SecurityBot <[email protected]>
diff --git a/google_cpm.c b/google_cpm.c
index ec0e68b..f88e0cc 100644
--- a/google_cpm.c
+++ b/google_cpm.c
@@ -811,7 +811,7 @@
 	 * done holding a lock on &gcpm->chg_psy_lock (cc_max will become the
 	 * same as gcpm->cp_fcc_hold_limit on exit).
 	 */
-	if (gcpm->cp_fcc_hold && gcpm->cp_fcc_hold_limit >= 0) {
+	if (gcpm->cp_fcc_hold && gcpm->cp_fcc_hold_limit >= 0 && cc_max != 0) {
 		/*
 		 * ->cp_fcc_hold is set when a thermal limit caused the switch
 		 * from CP to main-charger. In this case ->cp_fcc_hold_limit