
174 P.3d 1051 (2007)
217 Or. App. 144
Sidney MECHAM, Plaintiff-Appellant,
v.
Jean HILL, Superintendent, Snake River Correctional Institution, Defendant-Respondent.
05104743M; A131385.
Court of Appeals of Oregon.
Submitted on Record and Briefs October 12, 2007.
Decided December 19, 2007.
*1052 David E. Groom, Salem, submitted the brief for appellant.
Hardy Myers, Attorney General, Mary H. Williams, Solicitor General, and Denise G. Fjordbeck, Senior Assistant Attorney General, filed the brief for respondent.
Before EDMONDS, Presiding Judge, and WOLLHEIM and SERCOMBE, Judges.
SERCOMBE, J.
Plaintiff appeals a judgment dismissing a writ of habeas corpus as moot because he had been released from prison during the proceedings. That judgment is inconsistent with our decision in Baty v. Slater, 161 Or.App. 653, 984 P.2d 342 (1999), adh'd to on recons, 164 Or.App. 779, 995 P.2d 1176, rev. den., 331 Or. 191, 18 P.3d 1098 (2000). In Baty, we held that a petition for a writ of habeas corpus was not rendered moot by a plaintiff's release from imprisonment because adjudication of the controversy would affect the expiration date of his post-prison supervision term. We decline the state's invitation to overrule Baty. Nonetheless, we affirm the judgment because the writ of habeas corpus lacks merit and should have been dismissed for that reason.
Plaintiff was convicted in 1999 of two counts of attempted rape in the first degree (counts 14 and 15) and one count of attempted sodomy in the first degree (count 16). He was sentenced to probation for the attempted rape convictions and to a term of imprisonment and post-prison supervision for the attempted sodomy conviction. After completion of his incarceration term for the attempted sodomy conviction, plaintiff was jailed several times for violations of the conditions of his post-prison supervision. In 2003, plaintiff's probation on the attempted rape convictions was revoked, and he was sentenced to concurrent sentences of 28 and 38 months' imprisonment, with 10 years of post-prison supervision minus prison time served.
The judgment revoking probation imposed the following sentence:
"Therefore, the Court orders the following disposition:
"Probation is hereby revoked on all [counts]. Defendant is sentenced to:
"[Count] 14: 8D, 28 months DOC [Department of Corrections], 10 yrs PPS [post-prison supervision] less time served
"[Count] 15: 8B, 38 months DOC concurrent to [count] 14, 10 years PPS less time served[.]"
The sentencing court explained:

*1053 "[S]o Count 14, Court revokes probation, sentences you under Gridblock 8-D to 28 months to the Department of Corrections to be followed by 10 years postprison supervision less time actually served in custody.
"And on Count 15, the Court revokes probation and sentenced you-sentences you to a 38-month sentence, that's the center of the gridblock, with ten years' postprison supervision less time actually served in custody.
"You will receive credit for all time that you have served on the various probation violations since your release from custody on the count upon which you were serving, Count 16, the count upon which you were serving a prison sentence.
"And any time that the Department of Corrections believes should be credited to either Counts 14 or 15 for time served prior to your having gone into prison, but they'll make that calculation. * * *
"* * * *
"I am hopeful that when you are released in probably somewhere closer to two years because of the time that you've done on your violations * * *."
(Emphasis added.)
At the time plaintiff began serving those sentences, he had been in custody for 74 days for violations of his terms of probation and for time awaiting his probation violation hearings. Plaintiff was separately incarcerated for 223 days for violations of his post-prison supervision conditions imposed as part of his sentence on the attempted sodomy conviction. The county sheriff certified plaintiff's preincarceration custody on counts 14 and 15 and the Department of Corrections credited 74 days against the sentences imposed for the attempted rape convictions. Plaintiff began serving the sentences on those convictions on May 1, 2003. He completed his term of imprisonment on January 20, 2006.
A few months before his release, plaintiff filed a petition for a writ of habeas corpus. Plaintiff alleged that he was being unlawfully detained because he was not given full credit against his attempted rape incarceration terms for his preincarceration jail time served for violation of the terms of his probation. Following the issuance of the writ and its return, the state moved to dismiss the writ because the writ, the return, and the replication showed that plaintiff failed to establish a claim for habeas corpus relief. ORS 34.680(1). More particularly, the state filed an affidavit corroborating that plaintiff was given credit for the time served for the probation violations, but not given credit for the time he was jailed for the post-prison supervision violations arising from his attempted sodomy convictions.
Plaintiff filed an amended replication clarifying that he was claiming credit for the time served on the post-prison supervision violations because that credit was directed by the sentencing court. Plaintiff claimed that the state "has refused to recognize or comply with the clear terms of the Court's Judgment and sentence and has allowed Plaintiff credit for only 74 of the 297 days to which he is entitled." After plaintiff completed his incarceration term on the attempted rape convictions, the state argued that the petition should be dismissed for the additional reason of mootness. The court dismissed the petition as moot and entered judgment against plaintiff.
On appeal, plaintiff argues that the claim was not moot and that "the statutes should be read to allow for credit while [plaintiff] was in custody awaiting the various probation revocation hearings for which he was not revoked." The state asks that we reconsider and overrule Baty and affirm the dismissal as moot. Alternatively, the state contends that the dismissal of the petition was correct because plaintiff's sentence was properly calculated. We agree that the trial court erred in dismissing the claim as moot, but conclude that the court's disposition, nevertheless, was correct. The petition should have been dismissed for the alternative reason that was argued by the state: that the time served credit was consistent with statutory requirements.
ORS 137.320 and ORS 137.370 preclude any credit against the sentences imposed for the attempted rape convictions for the time served on the post-prison supervision *1054 violations arising from his attempted sodomy conviction. ORS 137.320 provides, in part:
"(1) When a judgment includes commitment to the legal and physical custody of the Department of Corrections, the sheriff shall deliver the defendant, together with a copy of the entry of judgment and a statement signed by the sheriff of the number of days the defendant was imprisoned prior to delivery, to the superintendent of the Department of Corrections institution to which the defendant is initially assigned pursuant to ORS 137.124.
"* * * * *
"(3) Upon receipt of the information described in subsection (1) * * * of this section, the Department of Corrections shall establish a case file and compute the defendant's sentence in accordance with the provisions of ORS 137.370.
"(4) When the judgment is imprisonment in the county jail or a fine and that the defendant be imprisoned until it is paid, the judgment shall be executed by the sheriff of the county. The sheriff shall compute the time the defendant was imprisoned after arrest and prior to the commencement of the term specified in the judgment. Such time shall be credited towards the term of the sentence."
Those parts of ORS 137.320 were construed by the Supreme Court in Nissel v. Pearce, 307 Or. 102, 105, 764 P.2d 224 (1988), to limit a sentencing court's authority to provide credit for time served:
"ORS 137.320 does not authorize the sentencing judge to order credit for time served. ORS 137.320(1) requires that the sheriff deliver a signed statement of the number of days the defendant was in custody before he or she was delivered to the Corrections Division. ORS 137.320(3) and (4) provide that either the Department of Corrections (in the case of incarceration in a state prison) or the sheriff (in the case of incarceration in a county jail) shall compute the defendant's sentence and give credit for presentence time served. The sentencing judge simply has no authority to order or compute credit for presentence time served."
(Citations omitted.)
Plaintiff contended in his amended replication that the presentence credit allowed by the sheriff and the Department of Corrections was less than that purportedly allowed by the sentencing court. Under Nissel, the court had no authority to order any credit. See also State v. Jones, 113 Or. App. 228, 229, 832 P.2d 459, modified on recons., 117 Or.App. 174, 842 P.2d 466 (1992) ("[ORS 137.320] does not authorize the sentencing court to order credit for time served.").
In any event, we do not interpret the judgment to allow any credit beyond that authorized by law. The imposed sentences are stated to be "less time served." Those references are to the "time served" for which credit is available under ORS 137.370. The oral remarks of the sentencing judge confirm that plaintiff is to be given credit "for all you have served on the various probation violations" as calculated by the Department of Corrections.
Thus, the only relevant issue is what credit should have been provided by the Department of Corrections under ORS 137.370. That statute provides, in part:
"(1) When a person is sentenced to imprisonment in the custody of the Department of Corrections, the term of confinement therein commences from the day the person is delivered to the custody of an officer of the Department of Corrections for the purpose of serving the sentence executed, regardless of whether the sentence is to be served in a state or federal institution.
"(2) Except as provided in subsections (3) and (4) of this section, when a person is sentenced to imprisonment in the custody of the Department of Corrections, for the purpose of computing the amount of sentence served the term of confinement includes only:
"(a) The time that the person is confined by any authority after the arrest for the crime for which sentence is imposed; and
"(b) The time that the person is authorized by the Department of Corrections to *1055 spend outside a confinement facility, in a program conducted by or for the Department of Corrections.
"(3) When a judgment of conviction is vacated and a new sentence is thereafter imposed upon the defendant for the same crime, the period of detention and imprisonment theretofore served shall be deducted from the maximum term, and from the minimum, if any, of the new sentence.
"(4) A person who is confined as the result of a sentence for a crime or conduct that is not directly related to the crime for which the sentence is imposed, or for violation of the conditions of probation, parole or post-prison supervision, shall not receive presentence incarceration credit for the time served in jail towards service of the term of confinement."
(Emphasis added.)
We have construed ORS 137.370(4) to mean that "credit for time spent in custody between arrest and commencement of sentence under ORS 137.320 is to be given only for time spent in custody as the result of the charge or conduct that gave rise to the charge for which the sentence is later imposed." State ex rel Curry v. Thompson, 156 Or.App. 537, 541, 967 P.2d 522 (1998), rev. den., 328 Or. 365, 987 P.2d 510 (1999) (quoting Randolph v. Dept. of Corrections, 139 Or.App. 79, 85, 910 P.2d 1171, rev. den., 323 Or. 114, 913 P.2d 1384 (1996)) (emphasis in Randolph). Here, the disputed presentence incarceration was for time served as a result of the attempted sodomy conviction-specifically, for violation of defendant's conditions of post-prison supervision arising from that conviction-and not the attempted rape convictions for which the relevant sentence was imposed. Therefore, plaintiff was not entitled to any additional credits against his sentences for attempted rape for that time.
Plaintiff's remaining contention on appeal, that he was entitled to credit for the time in custody "awaiting the various probation revocation hearings for which he was not revoked," was not preserved. In plaintiff's amended replication, he concedes that the disputed time served was "for alleged violations of the terms of post-prison supervision." Plaintiff did not assert below that there was uncredited time that was served as part of the probation revocation proceedings.
Affirmed.
