Article - Criminal Procedure
(a) The remedy provided under this title is not a substitute for and does not affect any remedy that is incident to the proceedings in the trial court or any remedy of direct review of the sentence or conviction.
(b) (1) In a case in which a person challenges the validity of confinement under a sentence of imprisonment by seeking the writ of habeas corpus or the writ of coram nobis or by invoking a common law or statutory remedy other than this title, a person may not appeal to the Court of Appeals or the Court of Special Appeals.
(2) This subtitle does not bar an appeal to the Court of Special Appeals:
(i) in a habeas corpus proceeding begun under § 9–110 of this article; or
(ii) in any other proceeding in which a writ of habeas corpus is sought for a purpose other than to challenge the legality of a conviction of a crime or sentence of imprisonment for the conviction of the crime, including confinement as a result of a proceeding under Title 4 of the Correctional Services Article.