An appeal may not be taken by the defendant from a judgment of conviction on the ground of an error in the imposition or calculation of fines, penalty assessments, surcharges, fees, or costs unless the defendant first presents the claim in the trial court at the time of sentencing, or if the error is not discovered until after sentencing, the defendant first makes a motion for correction in the trial court, which may be made informally in writing. The trial court retains jurisdiction after a notice of appeal has been filed to correct any error in the imposition or calculation of fines, penalty assessments, surcharges, fees, or costs upon the defendant's request for correction. This section only applies in cases where the erroneous imposition or calculation of fines, penalty assessments, surcharges, fees, or costs are the sole issue on appeal.
Ca. Pen. Code § 1237.2