L.A. Kings hockey star Jarret Stoll just cut a great deal in his Vegas cocaine case -- because the felony drug possession charge was dropped and he'll do NO jail time.
As we previously reported, Stoll -- boyfriend of Erin Andrews -- was busted on April 17th for allegedly bringing cocaine and ecstasy to a Vegas pool party.
Now, we've learned ... Stoll struck a deal with prosecutors in which he agreed to plead guilty to 2 misdemeanors -- breach of peace and trespass.
Stoll was facing up to 4 years behind bars for the drug charge ... instead, he won't spend one minute in jail and will NOT be on probation.
As part of the agreement, Stoll will launch a hockey program for at risk kids in Vegas and also work with the Salvation Army.
In a statement issued through his lawyer, David Chesnoff, Stoll says ... "Now that the case has been resolved I am committed to meeting all of my obligations to the court am grateful for the chance to offer guidance and share positive life lessons to kids as part of the resolution of this matter."
"My focus remains on hockey and I am looking forward to getting back on the ice next season."