Robert Downey Jr.'s son, Indio Downey has pleaded guilty to the drugs charges, for which he was arrested earlier in June.
The 'Iron Man' star was present in the court to support his 21-year-old boy, who was booked for cocaine possession and had voluntarily checked himself into rehab two months ago, the Mirror reported.
Judge Keith Schwartz said he was pleased with his efforts, and encouraged him stay clean for the conviction could be wiped clean if he stayed clean for 18 months.
He also told Indio, who was automatically entitled to a drug diversion program as it was his time offence, to take inspiration from his father, who too had struggled with drug problems back in 1990's.
Earlier, Indio, who's also been charged with wrong possession of drug paraphernalia, was allegedly spotted smoking out of a pipe in a vehicle after which he was detained for cocaine possession in West Hollywood.