The court shall review, before docketing, if feasible or, in any event, as soon as practicable after docketing, a complaint in a civil action in which a prisoner seeks redress from a governmental entity or officer or employee of a governmental entity.
On review, the court shall identify cognizable claims or dismiss the complaint, or any portion of the complaint, if the complaint—
(1) is frivolous, malicious, or fails to state a claim upon which relief may be granted; or
(2) seeks monetary relief from a defendant who is immune from such relief.
As used in this section, the term “prisoner” means any person incarcerated or detained in any facility who is accused of, convicted of, sentenced for, or adjudicated delinquent for, violations of criminal law or the terms and conditions of parole, probation, pretrial release, or diversionary program.
(Added Pub. L. 104–134, title I, § 101[(a)] [title VIII, § 805(a)], Apr. 26, 1996, 110 Stat. 1321, 1321–75; renumbered title I, Pub. L. 104–140, § 1(a), May 2, 1996, 110 Stat. 1327.)