Cory Scharman appeals the dismissal of his petition for a writ of habeas corpus. We affirm, but without prejudice to the seeking of other relief.
Scharman, an inmate in the custody of the Department of Corrections, filed a ha-beas petition in the circuit court for Holmes County alleging that credit was not properly awarded for time previously served when he was sentenced following revocation of probation. Upon receipt of the petition, the trial court ordered the Department to respond, and thereafter, the Department moved to dismiss the petition for failure to first seek administrative relief. The trial court dismissed the petition on the ground that appellant did not exhaust his administrative remedies.
The relief sought by appellant — an award of credit for time previously served — is not a matter which the Department can provide. Scharman has not argued that the sentencing court did award credit upon revocation but that DOC has not applied such. See Morgan v. State, 99 So.3d 999, 1000 (Fla. 1st DCA 2012) (explaining that, if the defendant is entitled to prison credit, the trial court is required to check the box on the sentencing form indicating that the defendant is entitled to such credit, and once the court does so, the defendant must raise problems with the application of such credit with DOC).
A defendant sentenced to a probationary split sentence who violates probation and is resentenced to prison is entitled to credit for all time actually served in prison prior to his release on probation unless such credit is waived. See Bradley v. State, 631 So.2d 1096 (Fla.1994); State v. Holmes, 360 So.2d 380, 383 (Fla.1978); Jones v. State, 633 So.2d 482, 483 (Fla. 1st DCA 1994); § 921.0017, Fla. Stat. A defendant is entitled to such credit even *149when it results in a “windfall” requiring immediate release. See Cook v. State, 645 So.2d 436, 438 n. 5 (Fla.1994). However, a defendant may be denied such credit when the post-violation sentence is a result of a negotiated plea agreement and a subsequent grant of prison credit would negate the agreed-upon sentence. See Dortly v. State, 107 So.3d 1229 (Fla. 1st DCA 2013); Fulcher v. State, 875 So.2d 647, 649 (Fla. 3d DCA 2004). The failure to award credit for time served prior to release on probation is a matter which may be raised in a motion filed on the authority of rule 3.800(a), Florida Rules of Criminal Procedure. See Dortly, 107 So.3d at 1230.
While the trial court incorrectly dismissed the petition for the failure to exhaust administrative remedies, we affirm the result without prejudice to the seeking of appropriate relief.
AFFIRMED.
BENTON and PADOVANO, JJ„ and SENTERFITT, ELIZABETH, Associate Judge, concur.