Redmond O'Neal Redmond O'Neal

Redmond O'Neal could face up to three years in prison because of a judge's ruling that he violated the terms of his probation.

O'Neal — the son of Ryan O'Neal and Farrah Fawcett — was charged last week with heroin possession, after being stopped at a routine security checkpoint at a detention facility.

"Mr. O'Neal was recently discharged from a residential treatment facility after testing positive for meth and because traces of heroin were found in his room," a spokeswoman for the Los Angeles District Attorney told People.

On Friday, the judge terminated his participation in a program that allows drug offenders to receive treatment instead of serving jail time.

Neither prosecutors nor O'Neal's lawyer were immediately available for comment.