
760 N.E.2d 572 (2001)
326 Ill. App.3d 447
260 Ill.Dec. 155
Anthony E. ROBINSON, Plaintiff-Appellant,
v.
James M. SCHOMIG, Defendant-Appellee.
No. 4-01-0231.
Appellate Court of Illinois, Fourth District.
December 5, 2001.
*573 Anthony Robinson, Appellant Pro Se.
James E. Ryan, Attorney General, Joel D. Bertocchi, Solicitor General, William L. Browers, Kendall R. Mills, Assistant Attorneys General, Chicago, for James M. Schomig.
Justice STEIGMANN delivered the opinion of the court:
In January 2001, plaintiff, Anthony E. Robinson, an inmate at Pontiac Correctional Center (Pontiac), filed a pro se petition for writ of habeas corpus, alleging that defendant, James M. Schomig, the Pontiac warden, had violated his due process rights in numerous disciplinary proceedings over several years. In February 2001, the trial court dismissed the petition, upon finding that it did not state a proper habeas corpus claim. Robinson appeals, and we affirm.

I. BACKGROUND
In January 2001, Robinson filed a petition for writ of habeas corpus, alleging that (1) he was being unlawfully restrained in punitive segregation, and (2) his continued incarceration after July 27, 2002, would be unlawful. Specifically, he alleged that the procedures under which punitive segregation and revocation of his good-time credit were imposed violated both the rules of the Illinois Department of Corrections (DOC) (see 730 ILCS 5/3-8-7(d) (West 1998)) and minimum due process requirements under the United States and Illinois Constitutions. He further alleged that (1) he did not receive written statements from the adjustment committee (committee) as to evidence the committee relied upon and reasons for disciplinary actions taken (730 ILCS 5/3-8-7(e)(5) (West 1998)); (2) he was not afforded the opportunity to call witnesses and present evidence; and (3) the committee's findings were not supported by the evidence.
On February 20, 2001, the trial court ruled on Robinson's habeas corpus petition as follows:
"The court having considered the submissions of [Robinson] and having further considered the request for reconsideration made by [Robinson], finds that his complaints relate to his disagreement [with] certain disciplinary decisions reached on many occasions at the Pontiac Correctional Center from August 2, 1996, and extending over many episodes to July 24, 2000. The court finds that the remedy of habeas corpus is an improper vehicle with which to raise the concerns of [Robinson]. The court further finds that his complaints * * * are also untimely. Accordingly, the petition is dismissed."
This appeal followed.

II. ANALYSIS
Robinson first argues that habeas corpus is the appropriate vehicle for restoring his good-time credits and obtaining release from punitive segregation. We disagree.
A petition for writ of habeas corpus may not be used to review proceedings that do not exhibit one of the defects set forth in section 10-124 of the Code of Civil Procedure (Civil Code) (735 ILCS 5/10-124 (West 2000)), even if an alleged error involves a denial of constitutional rights. Barney v. Prisoner Review Board, 184 Ill.2d 428, 430, 235 Ill.Dec. 1, 704 N.E.2d 350, 351 (1998). Section 10-124 of the Civil Code provides as follows:
"If it appears that the prisoner is in custody by virtue of process from any court legally constituted, he or she may be discharged only for one or more of the following causes:

*574 1. Where the court has exceeded the limit of its jurisdiction, either as to the matter, place, sum[,] or person.
2. Where, though the original imprisonment was lawful, nevertheless, by some act, omission[,] or event which has subsequently taken place, the party has become entitled to be discharged.
3. Where the process is defective in some substantial form required by law.
4. Where the process, though in proper form, has been issued in a case or under circumstances where the law does not allow process to issue or orders to be entered for imprisonment or arrest.
5. Where, although in proper form, the process has been issued in a case or under circumstances unauthorized to issue or execute the same, or where the person having the custody of the prisoner under such process is not the person empowered by law to detain him or her.
6. Where the process appears to have been obtained by false pretense or bribery.
7. Where there is no general law, nor any judgment or order of a court to authorize the process if in a civil action, nor any conviction if in a criminal proceeding. No court, on the return of a habeas corpus, shall, in any other matter, inquire into the legality or justice of a judgment of a court legally constituted." 735 ILCS 5/10-124 (West 1998).
See also Hughes v. Kiley, 67 Ill.2d 261, 267, 10 Ill.Dec. 247, 367 N.E.2d 700, 702 (1977) (a writ of habeas corpus is available only to obtain the release of a prisoner (1) who has been incarcerated under a judgment of a trial court that lacked jurisdiction of the subject matter or the person of the prisoner, or (2) where there has been some occurrence subsequent to the prisoner's conviction that entitles him to release).
In his habeas corpus petition, Robinson contends that his due process rights under Wolff v. McDonnell, 418 U.S. 539, 94 S.Ct. 2963, 41 L.Ed.2d 935 (1974), were violated in numerous disciplinary proceedings in which Schomig failed to follow DOC rules. Robinson thus claims he has been unlawfully deprived of five years' good-time credit and his continued incarceration after July 27, 2002, would be unlawful. However, his petition does not claim any of the grounds for relief listed in section 10-124 of the Civil Code (735 ILCS 5/10-124 (West 1998)). He does not even claim that he is currently being held beyond the time that he may legally be detained. See Barney, 184 Ill.2d at 431, 235 Ill.Dec. 1, 704 N.E.2d at 351 ("Habeas corpus does not lie if the person is in custody by virtue of a final judgment of any circuit court, or of any proceeding for the enforcement of such judgment, unless the time during which such party may be legally detained has expired"). Thus, Robinson is not entitled to habeas corpus relief, and the trial court did not err by dismissing his petition.

III. CONCLUSION
For the reasons stated, we affirm the trial court's judgment.
Affirmed.
McCULLOUGH, P.J., and TURNER, J., concur.
